Skip to content

surendiran04/Data-structures-and-Algorithms

Repository files navigation

Data-structures-and-Algorithms

  1. Binary Search
  2. QuickSort
  3. Merge Sort
  4. Bubble Sort
  5. Insertion Sort
  6. Selection Sort
  7. Depth-First Search (DFS)
  8. Breadth-First Search (BFS)
  9. Dijkstra’s Algorithm
  10. Bellman-Ford Algorithm
  11. Floyd-Warshall Algorithm
  12. Binary Tree Traversal (In-order, Pre-order, Post-order)
  13. A* Algorithm
  14. Knapsack Problem (Dynamic Programming)
  15. Dynamic Programming (e.g., Fibonacci Sequence)
  16. Hashing (e.g., Hash Tables)
  17. Kruskal’s Algorithm
  18. Prim’s Algorithm
  19. Bresenham’s Line Algorithm
  20. KMP Algorithm
  21. Rabin-Karp Algorithm
  22. Maximum Subarray Sum (Kadane’s Algorithm)
  23. Topological Sorting
  24. Ford-Fulkerson Algorithm (Max Flow)
  25. Monte Carlo Algorithm

Important Algorithms

1.DFS,BFS 2.Dynamic programming 3.Backtracking 4.Sliding window 5.Top k elements 6.PrefixSum

#important qn to ace b4 interview

  1. Reverse a linked list.
  2. Find the middle element of a linked list.
  3. Implement a stack using arrays/linked list.
  4. Implement a queue using arrays/linked list.
  5. Find the factorial of a number using recursion.
  6. Implement binary search in an array.
  7. Find the largest/smallest element in an array.
  8. Implement merge sort.
  9. Implement quick sort.
  10. Detect a cycle in a linked list.
  11. Find the intersection point of two linked lists.
  12. Check if a binary tree is a binary search tree (BST).
  13. Print all leaf nodes of a binary tree.
  14. Reverse a binary tree.
  15. Find the height of a binary tree.
  16. Implement depth-first search (DFS) on a graph.
  17. Implement breadth-first search (BFS) on a graph.
  18. Check if a graph is connected.
  19. Implement Dijkstra's algorithm for shortest path.
  20. Implement Prim's algorithm for minimum spanning tree.
  21. Implement Kruskal's algorithm for minimum spanning tree.
  22. Find the longest common subsequence of two strings.
  23. Find the longest increasing subsequence of an array.
  24. Implement the Knuth–Morris–Pratt (KMP) algorithm for string matching.
  25. Implement the Rabin-Karp algorithm for string matching.
  26. Check if a string is a palindrome.
  27. Check if two strings are anagrams of each other.
  28. Find the next greater element in an array.
  29. Find the kth smallest/largest element in an array.
  30. Find the median of two sorted arrays.
  31. Implement a trie (prefix tree).
  32. Find all subsets of a set.
  33. Find all permutations of a string.
  34. Implement the Josephus Problem.
  35. Implement an LRU (Least Recently Used) Cache.
  36. Find the longest palindrome substring in a string.
  37. Implement a priority queue.
  38. Implement a hashmap (dictionary).
  39. Count the number of inversions in an array.
  40. Find the shortest path in a maze.

About

implementation of various data structures and algorithms

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published