### Job Interview Questions

What is your favorite sorting algorithm.

How can we tell if there is a cycle in a linked list? Gave him one trivial and another smart solution, one that used a Boolean visited. He asked me what other way I can think of. Using two pointers, one going faster than the other was my last answer.

I have hundred numbers, from 1 to 100 and I am receiving them in any order. After receiving 99 of them, one is left. How can I tell which number is missing? Most efficient algorithm.

In a binary tree, write a method that decorates the elements with weight. A leaf has a weight of one. A node has a weight of the left sub tree and the right sub tree plus one for the node itself.

How would you test a wall? Integration issues, with other walls

How would you test a vending machine?

Puzzle: three people standing at three points, which has an equilateral triangle shape. Their speed is x, 2x, 3x. How should they move so that they can meet with the least amount of time?

Write a function that reverses a linked list in pairs. 1, 2, 3, 4 to 2,1,4,3. Give test cases for your function.

Given a binary search tree and an element, find next larger element in the binary search tree.

Give test cases for your function.

What would you sort strings read from a file. Use binary search tree and then traverse them inorder. I was asked to write the whole function.

Given a log in dialog box, how would you test it? Mentioned everything I remember and he was more interested on security issues. So, think about how you would test it for security testing.

Think as a hacker, that is the hint he gave me. Apparently, you can write and sql command that can shut down the original sql command and perform some operation, like droping a table.

Design a pencil? Test the design as a manufacturer of the pencil.

Write a function that reverses a linked list.

Write the substring function. And make it efficient. Specially, make the loop ending condition efficient.

Write the array implementation of the queue data structure. He was more interested in rolling back when we arrive at the end of the array.

My Advice to anyone doing such an interview, make sure you EAT WELL before anything else.

Subscribe to:
Post Comments (Atom)

## No comments:

## Post a Comment