- DS and Algo example code for My Blog
inside ArrayQuestion package you can find two java class.
- ArrayQuestion.java :- Contain all important question based on Array
- TestArrayQuestion.java :- Main class to compile and test question
Generally called as LL consist of a number of nodes in which each nodes has a next pointer to the following elements. The link of the last node points to NULL which indicates end of list.
Navigate in both direction
Each node contains Previous and Next node pointer.
CLL is a linked list where all nodes are connected to form a circle. There is no NULL at the end. A circular linked list can be a singly circular linked list or doubly circular linked list.
Inside LinkedListQuestion package, you guys find all very important interview question based on Linked List. So Do not miss the chance, go and see the question and solution. Run it verify it.
A stacks is an ordered list in which insertion and deletion are done at one end. The last element inserted is the first one to be deleted/removed.(LIFO)
Insertion in Stacks = push
remove from Stacks = pop
pop-out from Empty Stacks = UnderFlow
Push-in full stacks = over flow
I have added Example of Java Collection Interface(List, Set, Queue) and MAP. You can find all Example under "com.saurbh.java.collections.example"
- List interface have ArrayList and LinkedList Class
- Set interface have HashSet , LinkedHashSet and TreeSet class
- Queue interface have ArrayDeque and PriorityQueueclass
- Map interface have TreeMap and HashMap class
I have added Sorting example inside packge "src.com.saurabh.algo.sorting"
- Bubble Sort
- Insertion Sort
- Selection Sort
- Merge Sort
- Quick Sort