banner
S7 Software Solutions Challengeme
Home » Careers » Challengeme

Challenge me!


For the souls that love to be challenged

What excites you the most?
1. Applying complex algorithms to solve real world problems?
(or)
2. Digging below where others generally stop and understanding how things work?

1. If Algorithms are your passion.
Pair programming is a software development technique in which two programmers work together in one computer. One types in code while the other reviews each line of code as it's typed in. 'S7 Software' has decided to implement pair programming in its Bangalore branch. We have 'N' employees. For every two employees Ei and Ej, it might or might not be possible for them to work together (reasons being difference in domain expertise, variation of experience level, etc). Given who can work with whom, can you write a program that has to form maximum pairs possible.

Input (from stdin):
First line of the input (N) is the total number of employees. This will be followed by N lines each containing two integers (denoting the two employees who can work together).

Output (to stdout):
First line of output is the maximum number of pairs (M) that can be formed. This must be followed by M lines (denoting M pairs) each containing two numbers denoting the two employees in that pair. If there are multiple answers, return any one of them.

Example:
Input:
5
Karthik Kumar
Karthik Shwetha
Shwetha Ajay
Ajay Suresh
Ajay Kumar

Output:
2
Karthik Shwetha
Ajay Suresh

2. If you love to understand how things work underneath.

File: foocall

Download here a binary named foocall (compiled on Linux x86). Assume you got this binary for migration and the binary doesn't have debug information (you don't have the source too).

We know this binary has a function called .foo. which takes three parameters (int, int, char*) and we know that this function is called exactly three times. Can you find out what values are getting passed to this function in each call when the binary is executed?

Send your solutions along with your resume to challengeme@s7software.com