Friday, December 3, 2010
Thursday, December 2, 2010
Subscribe to:
Posts (Atom)
How to find middle node of LinkedList without using extra memory in java
To find the middle node of a LinkedList without using extra memory in Java, you can use the "tortoise and hare" algorithm. This al...
-
public class ReverseArrayWithoutExtraMemory { public static void main(String[] args) { int arr[] = {1,2,3,4,5,6}; int swapArray[] =...
-
1) List Interface Implementation public interface List<T extends Comparable<T>> { public Node<T> getMi...
-
public class SumPair { public static void main(String[] args) { int arr[] = {5,7,8,3,1,4,6,9,2}; int n = 12; findPair(arr,n); ...