Implement the C function atoi
Software Interview Questions
551,343 software interview questions shared by candidates
You have nine balls which look all identical but there is one that weighs more than the others. You also have a balance which you can use to compare two items at a time. What is the least amount of times that you can use the balance to find out which one is the heaviest ball?
string parsing question
Find total number of occurence's of each number in a given array
If you have an unsorted array of 1,000,000 elements, how would you sort this array?
Write a program to print all even numbers one below the other followed by odd numbers between 1 to 100 using only one 'for' loop. Output should look like this: 2 4 6 ...... 98 1 3 5 ...... 99 Is it possible to write a program for above output given the condition stated above
The programming problem was difficult because you must show programming prowess without overengineering the problem because it is simple, oh yeah it has to work too.
design an algorithm to located a retail location in an optimal position relative to our users.
Swap two integers, say a =4 and b=6, without using a third variable.
1st phone: Anagram problem, merge two sorted linked list, and the last ten minutes talked about LRU. 2nd phone: The problem was easy to understand, but I believe the solution would be really long. I didn't get it right, so failed on here. Given a string, parse it and return a string array. It's like a tokenizer, but the rules are too... For exmple, string="abc(edf)hij{klmn}opq[rst]uvw" The delimitors are (), {}, []. They are in pair. So output array: ["abc", "edf", "hij", "klmn", "opq", "rst", "uvw"] That's the rule 1. The rule 2 is, if any two consecutive "(" means escaping, that is "((" is actually output char "(". It's not part of the delimitor. Similar to ")", "{", "}", "[", "]". abc(e))df) => ["abc", "e)df"], since the "))" outpus ")". Rule 3: if "{" is inside a delimitor pair (), then "{" isn't part of the delimitor. Output it as is. abc(e{df}}g) => ["abc", "e{df}}g"] So, parse the given string and assume the given string is always valid and parsable. I think state machine is a good direction. But I didn't finish it.
Viewing 2611 - 2620 interview questions