JOIN
 Select a Forum     Round Tables New Member Discussions News Discussions Algorithm Matches Marathon Matches NASA Tournament Lab TopCoder Cookbook High School Matches Sponsor Discussions Development Forums Design Forums Search | Watch Thread  |  My Post History  |  My Watches  |  User Settings View: Flat  | Threaded  | Tree Previous Thread  |  Next Thread Forums Tutorial Discussions Range Minimum Query and Lowest Common Ancestor Is it Wrong?
 Is it Wrong? | Reply Process2:if (A[M[i][j - 1]] < A[M[i + (1 << (j - 1))][j - 1]]) M[i][j] = M[i][j - 1];else M[i][j] = M[i + (1 << (j - 1))][j - 1];may be should it:if (A[M[i][j - 1]] < A[M[i + (1 << (j - 1))-1][j - 1]]) M[i][j] = M[i][j - 1];else M[i][j] = M[i + (1 << (j - 1))-1][j - 1];
 Subject Author Date Is it Wrong? FORHAD-SUST-BD May 14, 2010 at 3:00 AM EDT Re: Is it Wrong? chuchao333 Feb 26, 2013 at 2:05 AM EST Re: Is it Wrong? charany1 Jan 15, 2015 at 12:16 PM EST
 Forums Tutorial Discussions Range Minimum Query and Lowest Common Ancestor Is it Wrong? Previous Thread  |  Next Thread