[algogeeks] Re: An interesting question

2011-03-09 Thread yogesh kumar
unchanged. Step 8: Now to find the value at matrix [0][0], you need to do matrix [0][0] Temp and save it into matrix [0][0]. Step 9: Print your matrix and exit. I think, now you will be get all the answers. Thanks Yogesh Kumar On Mar 9, 7:39 pm, bittu shashank7andr...@gmail.com wrote: @yoku..r

[algogeeks] Re: An interesting question

2011-03-06 Thread yogesh kumar
@pacific: Good Algorithm // This is the preface solution of this problem [:)] // Time complexity: O(n^2) // Space complexity: O(1) public class BinaryMatrix { public static void main(String arg[]) { int[][] matrix = new int[][]

[algogeeks] Re: printing without loop

2011-03-06 Thread yogesh kumar
@ Ruturaj: Your Problem's Solution.. :) public class Sorting { public static void main(String arg[]) { int[] a = {2,4,5,1,7,3}; a = checkNumber(0,1,a); // to Print an Array for(int k=0;ka.length;k++)