Intern Interview Questions
- 0of 0 votes
AnswersWrite a program to swap odd and even bits of a 32-bit unsigned integer with as few instructions as possible. (bit-0 and bit-1 are swapped, bit-2 and bit-3 are swapped and so on)
- @ce October 24, 2012 in India| Report Duplicate | Flag | PURGE
Microsoft Intern Bit Manipulation - 0of 0 votes
AnswersDesign a game of Tic-Tac-Toe. Only instead of 3x3, this is a game on n x n board. Two manual players play the game. A player wins if there are all "X" or all "O" in either of n rows, n columns or 2 diagonals. What are the classes and data structure you will define? After each move/turn of a player, it is checked whether the player won the game. Minimize this time. Assume having no space constraint.
- @ce October 24, 2012 in India| Report Duplicate | Flag | PURGE
Microsoft Intern - 0of 0 votes
AnswersGiven a positive integer, decode it into a string in following way :-
- @ce October 24, 2012 in India
1 - a, 2 - b,3 - c,...26 - z, 27 - aa, 28 - ab........and so on.| Report Duplicate | Flag | PURGE
Microsoft Intern Coding - 0of 0 votes
AnswersGiven today is Thursday and 23rd August, 2012. Write a function to input a date (future or past) and tell which day it is:-
- @ce October 24, 2012 in India
int day_of_week(int dd, int mm, int yyyy)
Mon -1, Tue - 2, Wed -3......Sun-7| Report Duplicate | Flag | PURGE
Microsoft Intern Coding - 1of 1 vote
AnswersWith a pointer to head node of a linked list as argument, write a function to swap the consecutive elements of the list and return the head node. (Do note change values of any node, only change the links.)
- @ce October 24, 2012 in India
Example :-
1->2->3->4->5->6->7
2->1->4->3->6->5->7| Report Duplicate | Flag | PURGE
Microsoft Intern Linked Lists - 1of 1 vote
AnswersGiven an array of integers, give the most efficient algorithm to find if the array has a majority element. If the array has a majority element, find this element. (Note : The majority element is the element that occurs more than half of the size of the array)
- @ce October 24, 2012 in India| Report Duplicate | Flag | PURGE
Microsoft Intern Algorithm - 0of 0 votes
AnswerA screen has different shapes of objects. The number f objects is large like million. We want to zoom into a region on the screen. How can we identify which objects should be displayed in the zoomed area? Give a data structure to store objects.
- gradstudent13 October 23, 2012 in United States| Report Duplicate | Flag | PURGE
Microsoft Intern Data Structures - 1of 1 vote
AnswersGiven an array of Integers of size n, Find element appearing more than n/2 times
- azharu92 September 20, 2012 in India| Report Duplicate | Flag | PURGE
Directi Intern Algorithm - 2of 2 votes
Answerstwo BST are given find common elements in both....
- abhishek September 09, 2012 in India for idc| Report Duplicate | Flag | PURGE
Microsoft Intern Trees and Graphs - 0of 0 votes
Answersgiven s string "1010101010" in base2 convert it into string with base4.not use extra space....
- abhishek September 09, 2012 in India for idc| Report Duplicate | Flag | PURGE
Microsoft Intern String Manipulation - 0of 0 votes
AnswersI have 1 million queries on disk to sort, my local memory/catch can store up to 1 thousand queries, how can I perform sort?
- saobimila999 August 19, 2012 in United States| Report Duplicate | Flag | PURGE
Google Intern Algorithm - 0of 0 votes
AnswersHow do you find the first instance of a given number in a sorted array in which many of the numbers are repeated?
- nitish712 August 05, 2012 in India
What is the time complexity of your code?| Report Duplicate | Flag | PURGE
Amazon Intern - 0of 0 votes
AnswersGive the output of the following code:
- akash1600 July 24, 2012 in United States#include<iostream> using namespace std; int main() { int a=10,b=2; b=a+++a; cout<<b<<" "<<a"\n"; return 0; }
| Report Duplicate | Flag | PURGE
Microsoft Intern C - 0of 0 votes
AnswersYou are given a number of points on the XY-plane, [(x0,y0),(x1,y1),(x2,y2),...].
- majestic12 July 22, 2012 in India
A point (xi,yi) is dominant to another point (xj,yj) iff xi>xj and yi>yj.
Calculate all pairs of points such that one dominates the other.
A time complexity less then O(n*n) was required.| Report Duplicate | Flag | PURGE
Directi Intern Algorithm - 0of 0 votes
Answerswrite the test cases for a chess application.
- Kavish Dwivedi July 21, 2012 in United States for mobile engineering| Report Duplicate | Flag | PURGE
Intern General Questions and Comments - 0of 0 votes
Answerswrite a running c program. When you compile the program another c program shud run and output of the 3rd command must be printed. give the UNIX xommands for the same.
- Kavish Dwivedi July 21, 2012 in United States for mobile engineering| Report Duplicate | Flag | PURGE
Intern Unix - 0of 0 votes
AnswersGiven N points in 3d space give the minimum number of points as the vertces of the figure and their coordinates which enclose the whole set of points within it.
- Kavish Dwivedi July 21, 2012 in United States for mobile engineering| Report Duplicate | Flag | PURGE
Intern Algorithm - 0of 0 votes
AnswersGiven list A with 4 integers between 1 and 10, you should come up with list B with three integers such that all the values in list A can be obtained by adding 1 or more values in list B.
- sudhagarsachin July 21, 2012 in India
Example:
input: 2 4 6 7
output:1 2 4
Explanation:
2-2
4-4
6-2+4
7-1+2+4| Report Duplicate | Flag | PURGE
ThoughtWorks Intern Algorithm - 1of 1 vote
AnswersThere are three people and they need to know the average of their salaries without knowing each other's salary. How will you do that?
- devsri July 03, 2012 in India for Lifecycle| Report Duplicate | Flag | PURGE
Adobe Abs india pvt. ltd. Software Engineer / Developer Intern Brain Teasers - 5of 5 votes
AnswersWrite a program to print all the permutations of the given input string.
- chandan.jc May 10, 2012 in United States for Software| Report Duplicate | Flag | PURGE
NetApp Intern Algorithm - 0of 0 votes
AnswersIn a multi-threaded process,If one thread is busy on I/O will the entire process be blocked?
- chandan.jc May 10, 2012 in United States for System Software| Report Duplicate | Flag | PURGE
NVIDIA Intern Operating System - 1of 1 vote
AnswersAssuming there's no Array data structure in C, how would you implement it.
- chandan.jc May 10, 2012 in United States for System Software| Report Duplicate | Flag | PURGE
NVIDIA Intern C - 0of 0 votes
AnswersInsert an element in a ordered (ascending) circular linked list. After inserting return the node with the smallest element.
- sai25590 April 11, 2012 in United States| Report Duplicate | Flag | PURGE
Walmart Labs Intern - 0of 0 votes
AnswersWhich one of these is a keyword in C? (a) printf (b) #define (c) sizeof (d) ->
- gigo April 05, 2012 in India| Report Duplicate | Flag | PURGE
RSA Intern C - 0of 0 votes
AnswersWhat is true about the value of π – (22/7) where π is the ratio of the circumference of a circle to its diameter in a Euclidean plane? (a) It is 0. (b) The value changes gradually every year as the universe expands. (c) It is close to 0.001. (d) It is close to -0.001
- gigo April 05, 2012 in India| Report Duplicate | Flag | PURGE
RSA Intern Math & Computation - 0of 0 votes
Answermalloc implementation
- DJ March 31, 2012 in United States
malloc allocation & stack allocation compare
Detailed questions on projects| Report Duplicate | Flag | PURGE
NetApp Intern C - 1of 1 vote
AnswersDifference between array and linked list
- DJ March 31, 2012 in United States| Report Duplicate | Flag | PURGE
NVIDIA Intern Arrays - 0of 0 votes
AnswersReturn all factorials of given integer. Enhance your approach by avoiding linear traversing.
- test222 March 29, 2012 in United States| Report Duplicate | Flag | PURGE
Amazon Intern Math & Computation - 2of 2 votes
AnswersCalculate number of zeros in a given integer.
- test222 March 29, 2012 in United States| Report Duplicate | Flag | PURGE
Amazon Intern Bit Manipulation