CODES

some learning from problems.

CODES

some learning from problems.

Sunday, 14 April 2013

Google Code Jam Problem A. Tic-Tac-Toe-Tomek

›
Below is my solution for  Problem A: Tic-Tac-Toe-Tomek Well I qualified for  Google Code Jam 2013  with only 60 points. Problem...
Sunday, 25 November 2012

write a function to check given string matches with given pattern

›
write a function to check given string matches with given pattern Condition: only one wildcard used in the pattern, that is '*',...

Finding Pythagorean triplets in an array.

›
Finding Pythagorean triplets in an array. Input :     3 9 4 8 6 11 12 Output :  No such solution exist Input :    3 5 4 8 6 11 10 ...
2 comments:
Tuesday, 2 October 2012

Re-arrange the odd/even to odd/even places

›
Given an array of integers [3,1,4,5,7,6,10,8], re arrange elements such that either even numbers in even locations or odd numbers in ...
2 comments:
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.