Skip to content

Data Structures and Algorithms problem and solution from GeekforGeeks with CP Books and Notes

License

Notifications You must be signed in to change notification settings

naemazam/Data-Structures-and-Algorithms-GFG

Repository files navigation

Data-Structures-and-Algorithms-GFG

Data Structures and Algorithms problem and solution from GeekforGeeks with CP Books and Notes

Interview Data-Structures-and-Algorithms-GFG Problems from GeekforGeeks

This repository is a collection of my solutions to the must do probelms in geeksforgeeks

0. To get started follow the Books

  1. The Data-Structures-and-Algorithms-GFG Book

  2. Cracking-the-Data-Structures-and-Algorithms-GFG-Interview-6th-Edition-189-Programming-Questions-and-Solutions

  3. Guide to Competitive Programming_ Learning and Improving Algorithms Through Contests

1. Divide and Conquer

  1. Find the element that appears once in sorted array

  2. Search in a Rotated Array

  3. Binaray Search

  4. Sum of Middle Elements of two sorted arrays

  5. Quick Sort

  6. Merge Sort

  7. K-th element of two sorted Arrays

2. Recursion

  1. Flood fill Algorithm

  2. Number of paths

  3. Combination Sum – Part 2

  4. Special Keyboard

  5. Josephus problem

3. Arrays

  1. Subarray with given sum

  2. Count the triplets

  3. Kadane’s Algorithm

  4. Missing number in array

  5. Merge two sorted arrays

  6. Rearrange array alternatively

  7. Number of pairs

  8. Inversion of Array

  9. Sort an array of 0s, 1s and 2s

  10. Equilibrium point

  11. Leaders in an array

  12. Minimum Platforms

  13. Reverse array in groups.

  14. K’th smallest element

  15. Trapping Rain Water

  16. Pythagorean Triplet

  17. Chocolate Distribution Problem

  18. Stock buy and sell

  19. Element with left side smaller and right side greater

  20. Convert array into Zig-Zag fashion

  21. Last Index of 1

  22. Spirally traversing a matrix

  23. Largest Number formed from an Array

4. Strings

  1. Reverse words in a given string

  2. Permutations of a given string

  3. Longest Palindrome in a String

  4. Recursively remove all adjacent duplicates

  5. Check if string is rotated by two places

  6. Roman Number to Integer

  7. Anagram

  8. Remove Duplicates

  9. Form a Palindrome

  10. Longest Distinct Characters in the string

  11. Implement Atoi

  12. Implement strstr

  13. Longest Common Prefix

5. Linked List

  1. Finding middle element in a linked list
  2. Reverse a linked list
  3. Rotate a Linked List
  4. Reverse a Linked List in groups of given size
  5. Intersection point in Y shaped linked lists
  6. Detect Loop in linked list
  7. Remove loop in Linked List
  8. N’th node from end of linked list
  9. Flattening a Linked List
  10. Merge two sorted linked lists
  11. Intersection point of two Linked Lists
  12. Pairwise swap of a linked list
  13. Add two numbers represented by linked lists CPP , Add two numbers represented by linked lists Java
  14. Check if Linked List is Palindrome
  15. Implement Queue using Linked List
  16. Implement Stack using Linked List
  17. Given a linked list of 0s, 1s and 2s, sort it
  18. Delete without head pointer

6. Stack and Queue

7. Tree and BST