Skip to main content

Divide and Conquer Problems in JAVA


  • Binary Search
  • Merge Sort
  • Quick Sort
  • Median Finding
  • Min and Max Finding
  • Matrix Multiplication
  • Closet Pair Problem

Comments

.

Popular posts from this blog

Adding Node at a given position in Linked List

Adding Node at a given position in Linked List




publicvoidaddNodeAtPosition(Node head,int position,int data){ Node temp=head;//create a node Node node=new Node(data);int c=1;//while counter is not equal to the positionwhile(c!=position){ temp=temp.next; c++;}//point node to the next of current node node.next=temp.next;//point next of current to the node to insert temp.next=node;}To Know the basic structure of the linked list click here