Firstly a brief introduction (education, experience, projects, skill-set and achievements), Interviewer asked for the roles and responsibility in current organization, after that he jumped to coding questions,
Coding Questions
He asked 2 questions,
First coding question
Q1. Print inverted pyramid pattern (easily solved),
Second coding question is based on string,
Q2. Write a function reshape(n, str) , in which you have to insert '/n' after n character of the string.
Example: reshape (3, "abc de fghij") , this should return "abc/ndef/nghi/nj", (able to solve)
Logical Reasoning questions:
Q1. You are given 9 balls, out of them 8 balls weight 1kg and 1 ball weight 940gm. Using a weighing scale (like tarazu) in minimum number of chances you need to identify which 1 ball weight 940gm. ( I figure out in 3 moves, so he asked can we do better, then I answer 2 moves and explain the approach)
Q2. It was similar to "Tough Two Jug Measuring Puzzle" , I was given one 3 litre mug and one 5 litre mug and I have to measure 4 litre using these mugs.
Other Questions:
OOPs related questions,
How garbage collection works and when garbage collector start collecting garbage
What is recursion etc
Logical Reasoning Q1 Answer
Assuming Weighing Scale is like the picture below:
Step 1
Step 2