I don't think the inner loop is executing only once . Kindly check it for 
this test case {1,3,5,8,9,2,6,7,6,8,9} . And try to print i in inner loop 
you will find that for same values of i(Outer index) inner loop is called. 
Its an O(n2) solution .

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to