-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
52 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package neetcode_150.src; | ||
|
||
/** | ||
* Top K Frequent Elements | ||
* | ||
* Given an integer array `nums` and integer `k`, return the `k` | ||
* most frequent | ||
* elements. | ||
* | ||
* @apiNote | ||
* - [1,1,1,2,2,3], k = 2 | ||
* - k = 2 which means we need to return the top two elements | ||
* - 1 = 3 times | ||
* - 2 = 2 times | ||
* - 3 = 1 times | ||
* - ans : [1,2] | ||
*/ | ||
public class TopKFrequentElement { | ||
public static void main(String[] args) { | ||
|
||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...rc/SearchAlgorithms/SearchAlgorithms.java → ...ms/SearchAlgorithms/SearchAlgorithms.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package SearchAlgorithms; | ||
package Algorithms.SearchAlgorithms; | ||
|
||
/** | ||
* Search Algorithms | ||
|
2 changes: 1 addition & 1 deletion
2
...rchAlgorithms/SearchAlgorithmsUsages.java → ...rchAlgorithms/SearchAlgorithmsUsages.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package SearchAlgorithms; | ||
package Algorithms.SearchAlgorithms; | ||
|
||
public class SearchAlgorithmsUsages { | ||
|
||
|
4 changes: 2 additions & 2 deletions
4
...rc/DynamicArrays/DynamicArraySamples.java → ...es/DynamicArrays/DynamicArraySamples.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 5 additions & 3 deletions
8
...ctures/src/LinkedList/BrowserHistory.java → ...Structures/LinkedList/BrowserHistory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
...res/src/LinkedList/LinkedListSamples.java → ...uctures/LinkedList/LinkedListSamples.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ures/src/Queues/PriorityQueueSamples.java → ...ructures/Queues/PriorityQueueSamples.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package Queues; | ||
package DataStructures.Queues; | ||
|
||
import java.util.Collections; | ||
import java.util.PriorityQueue; | ||
|
5 changes: 3 additions & 2 deletions
5
data_structures/src/Queues/QueueSamples.java → ...c/DataStructures/Queues/QueueSamples.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
data_structures/src/Shared/DynamicArray.java → ...c/DataStructures/Shared/DynamicArray.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package Shared; | ||
package DataStructures.Shared; | ||
|
||
public class DynamicArray { | ||
private int size; | ||
|
3 changes: 2 additions & 1 deletion
3
data_structures/src/Stacks/StackSamples.java → ...c/DataStructures/Stacks/StackSamples.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...tructures/src/Stacks/UndoRedoManager.java → ...ataStructures/Stacks/UndoRedoManager.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package Stacks; | ||
package DataStructures.Stacks; | ||
|
||
import java.util.Stack; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters