First page
Next page
Q497: Given four points in the XY co-ordinate system, write a function to check if it will form a rectangle or not.
tags: microsoft C
Q243: How do you reverse a single linked list?
tags: ebay software
Q77: Given an array of length N containing integers between 1 and N, determine if it contains any duplicates.
tags: microsoft sw programming algorithms
Q199: You have been shrunk down to the size of a nickel and tossed into a blender. You are told that the blender blades will start in 60 seconds.What would you do to save your life?
tags: google behavioral general
Q337: Given a string s1 and a string s2, write code to say whether s2 is a rotation of s1 using only one call to strstr routine?
tags: microsoft sw
Q175: A band is going in the street with a constant speed. Someone in the last row has a dog. The dog runs ahead, reaches the front row of the band and gets back to it's owner. The dog's speed was constant all the way and while it was running the band passed 50 feet. Find the length of the dog's path,if the distance between the front and the rear row of the band is 50 feet.
tags: microsoft puzzle
Q480: Get the width of a binary tree
tags: google Algorithm
Q167: What is aliasing?
tags: microsoft intel amd nvidia hw comparch architecture hardware
Q559: Write a C program which measures the the speed of a context switch on a UNIX/Linux system
tags: google sw unix os
Q3: There are 3 boxes. One of them has red balls, one has blue balls only and the other has mixture of red and blue balls. The labels on their boxes always lie. (i.e. if the label says red, you are sure that it doesn't have red balls only,it could be a mixture) The task is to pick one box and pick only one ball from it and then correctly label all the three boxes.
tags: microsoft puzzle
Q81: An array of pointers to (very long) strings. Find pointers to the (lexicographically) smallest and largest strings.
tags: microsoft sw programming algorithms
Q19: (from Tara Hovel) A helicopter drops two trains, each on a parachute, onto a straight infinite railway line. There is an undefined distance between the two trains. Each faces the same direction, and upon landing, the parachute attached to each train falls to the ground next to the train and detaches. Each train has a microchip that controls its motion. The chips are identical. There is no way for the trains to know where they are. You need to write the code in the chip to make the trains bump into each other. Each line of code takes a single clock cycle to execute. You can use the following commands (and only these); MF - moves the train forward MB - moves the train backward IF (P) - conditional that is satisfied if the train is next to a parachute. There is no "then" to this IF statement. GOTO
tags: microsoft sw programming puzzle
Q158: How do you calculate the number of sets given its way and size in a cache?
tags: microsoft intel amd nvidia hw comparch architecture hardware
Q126: How do you represent an n-ary tree? Write a program to print the nodes of such a tree in breadth first order.
tags: microsoft sw programming algorithms
Q54: Write a small lexical analyzer - interviewer gave tokens. expressions like "a*b" etc.
tags: microsoft sw programming
Q97: Write an efficient C code for tr program. tr has two command line arguments. They both are strings of same length. tr reads an input file, replaces each character in the first string with the corresponding character in the second string. eg. tr abc xyz replaces all a by x, b by y and so on.
tags: microsoft sw programming
Q88: Write C code for (a) deleting an element from a linked list (b) traversing a linked list
tags: microsoft sw programming C
Q45: Linked list manipulation.
tags: microsoft sw programming
Q237: Name the three packets exchanged in the setup of a TCP connection. Followup: name the three packets exchanged when a client closes a TCP connection.
tags: google networking
Q5: Why is a manhole cover round?
tags: microsoft puzzle
Q58: Ways of optimizing symbol table storage in compilers.
tags: microsoft sw programming
Q60: A version of the "There are three persons X Y Z, one of which always lies".. etc..
tags: microsoft puzzle
Q64: Implement an algorithm to do string matching with wildcards.
tags: microsoft sw programming algorithms
Q148: Explain what is DMA?
tags: microsoft intel amd nvidia hw comparch architecture hardware
Q150: What are superscalar machines and vliw machines?
tags: microsoft intel amd nvidia hw comparch architecture hardware
Q500: Given an N x M two dimensional array of integers where all rows and columns are sorted in ascending order, write a function that can determine if a certain value exists in the array.
tags: microsoft programming data structures
Q56: Write a routine that prints out a 2-D array in spiral order!
tags: microsoft sw programming
Q214: Given 2 strings (as character arrays) A and B, how would you determine if the characters in B were a subset of the characters in A.
tags: google microsoft software programming algorithm
Q63: There are 4 women who want to cross a bridge. They all begin on the same side. You have 17 minutes to get all of them across to the other side. It is night. There is one flashlight. A maximum of two people can cross at one time. Any party who crosses, either 1 or 2 people, must have the flashlight with them. The flashlight must be walked back and forth, it cannot be thrown, etc. Each woman walks at a different speed. A pair must walk together at the rate of the slower woman's pace. Woman 1: 1 minute to cross Woman 2: 2 minutes to cross Woman 3: 5 minutes to cross Woman 4: 10 minutes to cross For example if Woman 1 and Woman 4 walk across first, 10 minutes have elapsed when they get to the other side of the bridge. If Woman 4 then returns with the flashlight, a total of 20 minutes have passed and you have failed the mission. What is the order required to get all women across in 17 minutes? Now, what's the other way?
tags: microsoft puzzle
Q177: A man is running across a bridge.When he is 3/8 of the way accross, he heard a train coming behind him. If he keeps running he will reach the end of the bridge at the same time with the train. If he turns around and runs back, he will get to the beginning of the bridge at the same time as the train. The man runs at a speed of 5mph. What is the speed of the train?
tags: microsoft puzzle math
Next page
Q497: Given four points in the XY co-ordinate system, write a function to check if it will form a rectangle or not.
tags: microsoft C
Q243: How do you reverse a single linked list?
tags: ebay software
Q77: Given an array of length N containing integers between 1 and N, determine if it contains any duplicates.
tags: microsoft sw programming algorithms
Q199: You have been shrunk down to the size of a nickel and tossed into a blender. You are told that the blender blades will start in 60 seconds.What would you do to save your life?
tags: google behavioral general
Q337: Given a string s1 and a string s2, write code to say whether s2 is a rotation of s1 using only one call to strstr routine?
tags: microsoft sw
Q175: A band is going in the street with a constant speed. Someone in the last row has a dog. The dog runs ahead, reaches the front row of the band and gets back to it's owner. The dog's speed was constant all the way and while it was running the band passed 50 feet. Find the length of the dog's path,if the distance between the front and the rear row of the band is 50 feet.
tags: microsoft puzzle
Q480: Get the width of a binary tree
tags: google Algorithm
Q167: What is aliasing?
tags: microsoft intel amd nvidia hw comparch architecture hardware
Q559: Write a C program which measures the the speed of a context switch on a UNIX/Linux system
tags: google sw unix os
Q3: There are 3 boxes. One of them has red balls, one has blue balls only and the other has mixture of red and blue balls. The labels on their boxes always lie. (i.e. if the label says red, you are sure that it doesn't have red balls only,it could be a mixture) The task is to pick one box and pick only one ball from it and then correctly label all the three boxes.
tags: microsoft puzzle
Q81: An array of pointers to (very long) strings. Find pointers to the (lexicographically) smallest and largest strings.
tags: microsoft sw programming algorithms
Q19: (from Tara Hovel) A helicopter drops two trains, each on a parachute, onto a straight infinite railway line. There is an undefined distance between the two trains. Each faces the same direction, and upon landing, the parachute attached to each train falls to the ground next to the train and detaches. Each train has a microchip that controls its motion. The chips are identical. There is no way for the trains to know where they are. You need to write the code in the chip to make the trains bump into each other. Each line of code takes a single clock cycle to execute. You can use the following commands (and only these); MF - moves the train forward MB - moves the train backward IF (P) - conditional that is satisfied if the train is next to a parachute. There is no "then" to this IF statement. GOTO
tags: microsoft sw programming puzzle
Q158: How do you calculate the number of sets given its way and size in a cache?
tags: microsoft intel amd nvidia hw comparch architecture hardware
Q126: How do you represent an n-ary tree? Write a program to print the nodes of such a tree in breadth first order.
tags: microsoft sw programming algorithms
Q54: Write a small lexical analyzer - interviewer gave tokens. expressions like "a*b" etc.
tags: microsoft sw programming
Q97: Write an efficient C code for tr program. tr has two command line arguments. They both are strings of same length. tr reads an input file, replaces each character in the first string with the corresponding character in the second string. eg. tr abc xyz replaces all a by x, b by y and so on.
tags: microsoft sw programming
Q88: Write C code for (a) deleting an element from a linked list (b) traversing a linked list
tags: microsoft sw programming C
Q45: Linked list manipulation.
tags: microsoft sw programming
Q237: Name the three packets exchanged in the setup of a TCP connection. Followup: name the three packets exchanged when a client closes a TCP connection.
tags: google networking
Q5: Why is a manhole cover round?
tags: microsoft puzzle
Q58: Ways of optimizing symbol table storage in compilers.
tags: microsoft sw programming
Q60: A version of the "There are three persons X Y Z, one of which always lies".. etc..
tags: microsoft puzzle
Q64: Implement an algorithm to do string matching with wildcards.
tags: microsoft sw programming algorithms
Q148: Explain what is DMA?
tags: microsoft intel amd nvidia hw comparch architecture hardware
Q150: What are superscalar machines and vliw machines?
tags: microsoft intel amd nvidia hw comparch architecture hardware
Q500: Given an N x M two dimensional array of integers where all rows and columns are sorted in ascending order, write a function that can determine if a certain value exists in the array.
tags: microsoft programming data structures
Q56: Write a routine that prints out a 2-D array in spiral order!
tags: microsoft sw programming
Q214: Given 2 strings (as character arrays) A and B, how would you determine if the characters in B were a subset of the characters in A.
tags: google microsoft software programming algorithm
Q63: There are 4 women who want to cross a bridge. They all begin on the same side. You have 17 minutes to get all of them across to the other side. It is night. There is one flashlight. A maximum of two people can cross at one time. Any party who crosses, either 1 or 2 people, must have the flashlight with them. The flashlight must be walked back and forth, it cannot be thrown, etc. Each woman walks at a different speed. A pair must walk together at the rate of the slower woman's pace. Woman 1: 1 minute to cross Woman 2: 2 minutes to cross Woman 3: 5 minutes to cross Woman 4: 10 minutes to cross For example if Woman 1 and Woman 4 walk across first, 10 minutes have elapsed when they get to the other side of the bridge. If Woman 4 then returns with the flashlight, a total of 20 minutes have passed and you have failed the mission. What is the order required to get all women across in 17 minutes? Now, what's the other way?
tags: microsoft puzzle
Q177: A man is running across a bridge.When he is 3/8 of the way accross, he heard a train coming behind him. If he keeps running he will reach the end of the bridge at the same time with the train. If he turns around and runs back, he will get to the beginning of the bridge at the same time as the train. The man runs at a speed of 5mph. What is the speed of the train?
tags: microsoft puzzle math
Next page
