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/

https://shirsh94.medium.com/top-100-interview-programming-questions-that-asks-many-times-5c5bf36449ab

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:

  1. Simple Linked List – In this type of linked list, one can move or traverse the linked list in only one direction
  2. Doubly Linked List – In this type of linked list, one can move or traverse the linked list in both directions (Forward and Backward)
  3. 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:

Queue:

queue_working

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

Article: BFS

Programing Questions:

  1. Sliding Window - https://lnkd.in/gu5eKzGD

  2. Interval Merge - https://lnkd.in/gtSsv3dA

  3. Island or Flood Fill - https://lnkd.in/gU6QBHyD

  4. Two Pointers - https://lnkd.in/g9spPPDk

  5. Cyclic Sort - https://lnkd.in/g9spPPDk

  6. In-place Reversal of a LinkedList - https://lnkd.in/g9spPPDk

  7. Tree Breadth-First Search - https://lnkd.in/g9spPPDk

  8. Tree Depth First Search - https://lnkd.in/g9spPPDk

  9. Two Heaps - https://lnkd.in/g9spPPDk

  10. Subsets - https://lnkd.in/gvdeUAPj

  11. Modified Binary Search - https://lnkd.in/g9spPPDk

  12. Bitwise XOR - https://lnkd.in/g9spPPDk

  13. Top ‘K’ Elements - https://lnkd.in/g9spPPDk

  14. K-way Merge - https://lnkd.in/gxhz9_Uh

  15. 0/1 Knapsack - https://lnkd.in/g9spPPDk

  16. Unbounded Knapsack - https://lnkd.in/g9spPPDk

  17. Fibonacci Numbers - https://lnkd.in/g9spPPDk

  18. Palindromic Subsequence - https://lnkd.in/g9spPPDk

  19. Longest Common Substring - https://lnkd.in/g9spPPDk

  20. Topological Sort - https://lnkd.in/gPE4sfcd

  21. Multi-threading - https://lnkd.in/g9spPPDk

  22. Fast & Slow Pointers - https://lnkd.in/g4_T9TWK

  23. Backtracking - https://lnkd.in/g9spPPDk

  24. Union Find - https://lnkd.in/g9spPPDk

  25. Monotonic Stack - https://lnkd.in/g9spPPDk