Online coding and apptitude test
18 MCQs and 2 Coding Questions
a) Given two positive number,using both find out the nth bit (binary) of the sum of given two number?
I told Interviewer the simplest solution but he was not satisfied, Interviewer want the better complexity. I can't completely solved the question but I solved it partially according to interviewer (Even i don't know how). Solution lies in moving back from nth bit to rhs part of binary numbers.
b)Given a large string,find out the length of longest palindrome in the string
Again I started with simplest solution , then for better complexity Interviewer gave me hints . I framed new solution and I was told to write a code ,I wrote the code completely but i forgot to handle the odd length.I missed just an IF block.They look for 100% accuracy.So always cover all test cases while writing code
I was not selected for the further round but a damn good interview for me without any preparation.I enjoyed it fully.
Geeksforgeek provides all these kind of questions with solution. A good platform for preparation.