Skip to content

This repo has various data structures and algorithms implementations and problems around that for preparing the coding interviews. πŸš€ πŸ‘¨β€πŸ’»πŸ’» 🚩

License

Notifications You must be signed in to change notification settings

NirmalSilwal/Data-Structure-and-Algorithm-Java-interview-kit

Repository files navigation

Java-practice

It will contain all logical problem and related concepts in Java.

THIS REPO IS IN PROGRESS ... πŸš€ πŸ‘¨β€πŸ’»

Keep an πŸ‘οΈ on it. I will be adding Data Structures and Algorithm implementaion along with problems related to the various DSA topics.

I AM WORKING EVERYDAY ON IT!


Directory Structure

This directory has the solution to most of the famous coding interivew questions divided by topics from increasing order of difficulty and topics. If you are time bounded, you can start practicing problems from this section directly or else from below section.

NOTE: This is the premium conent.


For absolute beginner

You can start from this section and follow along. This section also covers Big O Analysis to start off.

Topic Highlights

Complexity analysis, Prime Ladder, Merge Sorted Array, Insert in Arrray, Wage Calculator, Unicode Characters, String operations, String matching, String split, Output Formatting, Keyboard input, Literal, Adder, Arithmetic operations, Data type size ranges


Data Structure and Algorithm Training

This directory covers from basic programming towards learning DSA. It was the part of my course taken from CodingBlocks live Data Structure and Algo batch.

NOTE: This is the premium conent. Find the topic that interests you from topic highlights section or else follow day wise. You can finish each day content in 1 day to keep you going and stay motivated. Don't overdo and don't underdo. Try to be as much consistent.


Day wise Lesson Topic Category Topic Highlights
Day 1 Basic Programming Largest number, Loops demo, Function demo, Prime check, Simple interest, Sum of Natural numbers, Equal Remainder
Day 2 Mathematics GCD of two number, Nth Fibonacci, Prime Checking, Reverse Number
Day 3 Pattern printing square, left trianglular, right triangular, gunny, mirror, numeric triangular, numeric variation
Day 4 Data types Binary to Decimal, Data Types, Decimal to Binary, Temperature conversion
Day 5 Arrays Array Demo, Functions in Java, Maximum value in Array
Day 6 Sorting & Searching Bubble sort, Insertion sort, Selection sort, Linear Search, Reverse Array, Maximum sum of subarray
Day 7 Strings & Arrays ArrayList Demo, StringBuilder Demo, Strings Demo, String operations, 2D Array Demo, Spiral Print, Wave Print
Day 8 Bit Manipulation Bit masking, Count N bits, Extract Nth bit, Power of two check, Right most set bit, Turn ON Bit, Two unique elements in Array, Two missing element
Day 9 Famous Algos Maximum Subarray Sum, Kadane's Algo, Sieve of Eratosthenes, Sum of all sub-matrices, Merge Sorted Arrays
Day 10 Recursion - I Factorial, Nth Fibonacci, Linear Search Recursive, Move all X at End recursively, Power of N, Print Decreasing, Print Increasing, Print Decreasing Increasing, Print with Skip, isSorted Array
Day 11 Recursion - II Count Maze Path, String Permutations, Codes of String, Print Board Path, print Keypad Codes, Print Maze Path, Print String Subsequences
Day 12 Recursion - III N Queen problem, Permutation with Swap, Print Lexicographical Order, Tower of Hanoi, Maze path with Hurdles
Day 13 Backtracking Board Path with Ladders, Elephant total Paths, Suduko Solver, N Stairs Problem (ways to reach N stairs)
Day 14 Searching & Sorting Binary Search, First Index of N, Last Index of N, Maximum Height Ladder, Search in 2D matrix, Quick Sort, Merge Sort
Day 15 OOPS, Exception Handling Class, Objects, try catch demo, access specifier demo
Day 15.1 OOPS, Stack Class demo, constructor demo, getter setter, Static variables, instance variables, Object array, Stack using Array
Day 16 OOPS, Queue Access Specifier demo, Inheritance demo, Queue using Array, Absract demo, Polymorphism demo
Day 17 Stack & Queues Dynamic Stack, Dynamic Queue, Queue using Stack enqueue efficient, Balance Paranthesis, Reverse Queue, Reverse Stack, Next Greater Element, Stack using Array, Queue using Array
Day 18 LinkedList LinkedList implementation, Reverse LinkedList by reversing data iteratively, pointer recursively, list data by pointer
Day 19 LinkedList, Stack, Queues Kth Node from Last Node, Count Distinct Rectangles, Detect cycle in LL, Revese LL, MergeSort to LL, Mid of LL
Day 20 Binary Tree Binary Tree implementation, find element, height of BT, max data in BT, min data in BT, mirror BT, size of BT, Tree Traversals (preorder, inorder, postorder)
Day 21 Binary Tree Diameter of tree, checks Balanced Tree, Left view, Right view, Root to Leaf traversal, Sum of Leaf nodes, Level order Traversals,
Day 22 HashMap & Generics Hashmap demo, Generic concept demos
Day 23 Heaps Heap implementation
Day 24 Dynamic Programming Fibonacci problem iterative, recursive, DP approach
Recursion Recursion Bubble Sort, N Factorial, First Index, Last Index, Nth Fibonacci, Power of N, Print skip Decreasing Increasing, check Sorted Array, print Increasing, print Decreasing, Sum of N terms

GeeksForGeeks


Explore Cards
Monthly Challenges
Questions by difficulty order 

Top Interview Questions

root directory


Question set from Interview Prep directory


SN. Topics, DSA Practice Questions
1 Basic Programming various Pattern printing, Mathematical problems, Fibonacci Series, GCD, Prime number, Reverse number, Sum N Natural numbers, else if demo
2 Data types Temperature table, upper or lower case check
3 Functions, 1D Array, Number System, Searching, Sorting Linear Search, Binary Search, Insertion Sort, Selection Sort, Bubble Sort, Base conversion problems, Upper & Lower index of search element, Maximum value in Array
4 2D Array 2D Array demo, Wave pattern printing, Spiral wave print
5 Strings & StringBuilder String demo, StringBuilder demo, Print all Substrings, Print Characters in String
6 Recursion Bubble Sort, Factorial, First & Last Index in Array, isSorted Array, Nth Fibonacci, Pattern printing, Power of N, Search all indices of item, Print Decreasing, Print Increasing, Print Decreasing Increasing Skip, Print Decreasing Increasing
7 Get Recursion Print all Permutations of String, Maze Path, Maze Path Diagonal, Board Path, Get all Subsequences of String
9 Print Recursion Print Board Path, Print Maze Path, Print Maze Path Diagonal, Print N Queens, Print Subsequences, Count Board Path, Count Maze Path, Count Maze Path Diagonal, Count N Queens
10 Time & Space Complexity Merge Sort, Quick Sort, Power N optimal, Sieve of Eratosthenes, Dutch National Flag problem
11 Stacks implement Stack using Array, Reverse Stack, Next greater element in Array
12 Stack & Queue Implement Queue using Array, Stack & LinkedList, Reverse Queue, Stack using Queue Push & Pop Efficient, Queue using Stack Enqueue & Dequeue Efficient, Maximum in each Subarray of Window K, First Non-repeating Character, First Negative number in every subarray of size K
13 Backtracking N Queens, N Knights, N Queen Generic, Queen Permutations, Queen Combinations, Queen Combination with Killing, Coin Change Permutations, Coin Change Combinations, Blocked Maze Path
14 LinkedList implement LinkedList, Stack using LL, Queue using LL
15 Tree implement Binary Tree, Generic Tree, Binary Search Tree
16 Interface & Generics Generics demo, Dynamic Stack, Bubble Sort Generic, Comparator demo
17 HashMap implement HashMap from scratch, Collections, Subarray sum zero problem, Array Intersection, Generic LinkedList, Maximum Frequency Character
18 Heap implement Heap from scratch with various operations
19 Tries implement Trie, Heap Generic, Huffman Encoder for Space optimization
20 Dynamic Programming Board Path, Count Board Path, Count Binary Strings, Dungeon Game, Edit Distance problem, Fibonacci, LCS, K Ordered LCS, Knapsack problem, LCS of 3 Strings, Longest Increasing Subsequence, Longest Palindromic Subsequence, Matrix Chain Multiplication, Maze Path, Maze Path Diagonal, Mixture Colors, Palindrome Partitioning, Unique BST Counts, Wildcard Pattern Matching, Wine Problem (4 approaches to most of the problems)
21 Graph implement Graph from scratch, all Graph realted algorithms & problems
22 Segment Tree implement Segment Tree
23 Bit Masking/Bit Magic Add One, check Power of 2, check Even Odd, Extract Bit, Missing 2 Numbers, ith Magic Number, Pascal sum, Reset Bit, Rightmost Set Bit, Set ith Bit, Unique Element
24 Generic Tree implement Generic Tree from scratch, various problems on it
25 Binary Tree implement Binary Tree from scratch, various problems on it
26 Java Collections Maps, Set, Vector, Queue Interface demos
27 OOPS OOPS demo

Codeforces