CODES

some learning from problems.

CODES

some learning from problems.

Showing posts with label amazon. Show all posts
Showing posts with label amazon. Show all posts
Friday, 14 September 2012

Sort an Array of 0 1& 2 in one pass

›
 G iven an array  int a[] = {0, 1, 1 ,0, 2, 2, 1, 0 ,1, 2, 1,0 } to be converted into  {0, 0, 0, 0, 1, 1, 1, 1, 1 ,2 ,2 ,2} inplace a...
Wednesday, 25 July 2012

Given a 2–d matrix , which has only 1’s and 0’s in it. Find the total number of connected sets in that matrix.

›
Explanation: Connected set can be defined as group of cell(s) which has 1 mentioned on it and have at least one other cell in that se...
8 comments:
›
Home
View web version
Powered by Blogger.
Powered by Blogger.