Data Structure - ashish-ghub/docs GitHub Wiki
dsa-interviews-java https://www.scaler.com/topics/course/dsa-beginners-java/
[must go once] https://www.scaler.com/topics/course/dsa-interviews-java/video/539/
[DSA Blog] https://www.scaler.com/topics/data-structures/
trie-data-structure https://www.scaler.com/topics/data-structures/trie-data-structure/
LinkedList:( Java implementation java.util.LinkedList)
https://www.geeksforgeeks.org/what-is-linked-list
Advantages of Linked Lists over arrays:
- Dynamic Array.
- Ease of Insertion/Deletion.
Drawbacks of Linked Lists:
- Random access is not allowed. We have to access elements sequentially starting from the first node(head node). So we cannot do a binary search with linked lists efficiently with its default implementation.
- Extra memory space for a pointer is required with each element of the list.
- Not cache friendly. Since array elements are contiguous locations, there is locality of reference which is not there in case of linked lists.
Types of Linked Lists:
- Simple Linked List – In this type of linked list, one can move or traverse the linked list in only one direction
- Doubly Linked List – In this type of linked list, one can move or traverse the linked list in both directions (Forward and Backward)
- Circular Linked List – In this type of linked list, the last node of the linked list contains the link of the first/head node of the linked list in its next pointer and the first/head node contains the link of the last node of the linked list in its prev pointer
Java Collection on LinkedList a) java.util.LinkedList (doubly linkedlist) b) LinkedHashMap : Hash table and linked list implementation of the Map interface, with predictable iteration order. c) LinkedHashSet via LinkedHashMap it uses it (main implementation is there in LinkedList & LinkedHashMap)
https://docs.oracle.com/javase/8/docs/api/java/util/LinkedHashMap.html
source code java util:
- https://hg.openjdk.java.net/jdk8/jdk8/jdk/file/687fd7c7986d/src/share/classes/java/util/LinkedList.java
- https://hg.openjdk.java.net/jdk8/jdk8/jdk/file/687fd7c7986d/src/share/classes/java/util/LinkedHashMap.java
Queue:
-
Circular Queue
https://www.geeksforgeeks.org/circular-queue-set-2-circular-linked-list-implementation/?ref=rp
-
Deque
https://www.geeksforgeeks.org/implement-stack-queue-using-deque/?ref=lbp
Binary Tree
Binary Tree Algorithms for Technical Interviews - Full Course youtube
- introduction
https://www.geeksforgeeks.org/introduction-to-binary-tree-data-structure-and-algorithm-tutorials/
- Binary properties
https://www.geeksforgeeks.org/binary-tree-set-2-properties/?ref=lbp
- Types of Binary tree
https://www.geeksforgeeks.org/binary-tree-set-3-types-of-binary-tree/?ref=lbp
- Binary tree diameter
https://www.geeksforgeeks.org/diameter-of-a-binary-tree/?ref=lbp
Graph
Video: Graph Algorithms for Technical Interviews - Full Course Youtube
Programing Questions:
-
Sliding Window - https://lnkd.in/gu5eKzGD
-
Interval Merge - https://lnkd.in/gtSsv3dA
-
Island or Flood Fill - https://lnkd.in/gU6QBHyD
-
Two Pointers - https://lnkd.in/g9spPPDk
-
Cyclic Sort - https://lnkd.in/g9spPPDk
-
In-place Reversal of a LinkedList - https://lnkd.in/g9spPPDk
-
Tree Breadth-First Search - https://lnkd.in/g9spPPDk
-
Tree Depth First Search - https://lnkd.in/g9spPPDk
-
Two Heaps - https://lnkd.in/g9spPPDk
-
Subsets - https://lnkd.in/gvdeUAPj
-
Modified Binary Search - https://lnkd.in/g9spPPDk
-
Bitwise XOR - https://lnkd.in/g9spPPDk
-
Top ‘K’ Elements - https://lnkd.in/g9spPPDk
-
K-way Merge - https://lnkd.in/gxhz9_Uh
-
0/1 Knapsack - https://lnkd.in/g9spPPDk
-
Unbounded Knapsack - https://lnkd.in/g9spPPDk
-
Fibonacci Numbers - https://lnkd.in/g9spPPDk
-
Palindromic Subsequence - https://lnkd.in/g9spPPDk
-
Longest Common Substring - https://lnkd.in/g9spPPDk
-
Topological Sort - https://lnkd.in/gPE4sfcd
-
Multi-threading - https://lnkd.in/g9spPPDk
-
Fast & Slow Pointers - https://lnkd.in/g4_T9TWK
-
Backtracking - https://lnkd.in/g9spPPDk
-
Union Find - https://lnkd.in/g9spPPDk
-
Monotonic Stack - https://lnkd.in/g9spPPDk