Skip to content

Latest commit

 

History

133 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Algorithms and Data Structures

This is the collection of algorithms, data structures and Interview Questions with solutions. This repository contains my solutions for common algorithmic problems and implementation of Data Structures in Java. I've created this repository to learn about algorithms. I am adding solutions continuously.

Interview Questions package include 3 text files (1easy, 2medium and 3Hard) and solutions for each question.

8 Algorithms, 2 Data Structures and 134 Interview Questions with answers are provided so far.

##Problems:

###Arrays

  1. Rotate Array
  2. Contains Duplicate
  3. Find Peak Element
  4. Maximum Subarray
  5. Kth Largest Element in an Array
  6. Find All Duplicates in an Array
  7. Longest Increasing Subsequence
    And many other array problems

###Linked List

  1. Delete Node in a Linked List
  2. Palindrome Linked List
  3. Reverse Linked List
  4. Intersection of Two Linked Lists
  5. Linked List Cycle
  6. Remove Nth Node From End of List
  7. Merge Sort List
  8. Find Linked List Cycle
    And many other Linked list problems

###Binary Tree

  1. Binary Tree Level Order Traversal
  2. Sum of Left Leaves
  3. Invert Binary Tree
  4. Binary Search Tree Iterator
  5. Binary Tree Postorder Traversal
  6. Binary Tree Preorder Traversal
  7. Flatten Binary Tree to Linked List
  8. Symmetric Tree
  9. Binary Tree Inorder Traversal
  10. Same Tree
  11. Maximum Depth of Binary Tree
  12. Balanced Binary Tree
  13. Minimum Depth of Binary Tree
  14. Merge k Sorted Lists
  15. Sorted List to Balanced Binary Search Tree
  16. Validate Binary Search Tree
  17. Sorted List to Balanced BST
  18. Kth Smallest Element in a BST
  19. Binary Tree Zigzag Level Order Traversal
  20. Delete Node in a BST
  21. [Lowest Common Ancestor of BST] (https://github.com/sherxon/AlgoDS/blob/master/src/interviewquestions/easy/LowestCommonAncestorBST.java)
    And many other tree problems

###Math

  1. Integer Break
  2. Reverse Bits
  3. Palindrome Number
  4. Math.pow
  5. Jug and Water Problem
  6. [Sieve of Eratosthenes] (https://github.com/sherxon/AlgoDS/blob/master/src/algo/numerals/SieveofEratosthenes.java)
  7. [Fermat's primality] (https://github.com/sherxon/AlgoDS/blob/master/src/algo/numerals/FermatPrimality.java)

###Misc 1)Permutations
2)Subsets

##Algorithms

###Sorting And Searching:

  1. Bubble Sort
  2. Insertion Sort
  3. Selection Sort
  4. Counting Sort

###Graphs:

  1. Breadth First Search (BFS)
  2. Depth First Search (DFS)
  3. Prim's Minimum Spanning Tree (MST)
  4. KrusKal's Minimum Spanning Tree (MST)
  5. Topological Sorting
  6. Shortest Path Dijsktra
  7. Shortest Path Bellman-Ford

###Dynamic Programming 1)Fibonacci Numbers

###String 1)Rabin Karp Subsequence search

##Data Structure:

###Trees:
1)Binary Search Tree (recursive)
2)Binary Search Tree (iterative)
3)AVL Tree

About

Implementation of Algorithms and Data Structures, Problems and Solutions

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages