Technical Interview

Home
Added Recently
Data Structures
Puzzles
Google & Microsoft
C/C++ Questions
Java Interview Questions
Quantitative Problems
Algorithms
Featured Articles
Amazon Interview Question
Compaq Interview Question
Technical Interview
Interview Process
Introduction Questions
Object Oriented
Google Pages
Fundamental Questions
Resume Tips
Links
Contact Us
Submit Question/Answer

Added recently: questions, puzzles,....






  • Algorithms Interview Question: Given two numbers m and n, write a method to return the first number r that is divisible by both....


  • Tree Interview Question: Write a C program to delete a tree (i.e, free up its nodes)

  • Tree Interview Question: Write a C program to determine the number of elements (or size) in a tree. 



  • Java Interview Question: In Java, You can create a String object as below...


  • C/C++ Data Structures Interview Question:How to create a copy of a linked list? Write a C program to create a copy of a linked list.

  • C/C++ Data Structures Interview Question:How to compare two linked lists? Write a C program to compare two linked lists. 

  • C/C++ Data Structures Interview Question:If you are using C language to implement the heterogeneous linked list, what pointer type will you use?

  • C/C++ Data Structures Interview Question:How would you detect a loop in a linked list? Write a C program to detect a loop in a linked list.

  • C/C++ Data Structures Interview Question:How do you find the middle of a linked list? Write a C program to return the middle of a linked list




  • C/C++ Interview Question: What are references in C++? Why do you need them when you have pointers?

  • C/C++ Interview Question: How do you do dynamic memory allocation in C applications? List advantages and disadvantages of dynamic memory allocation vs. static memory allocation.






  • Java Interview QuestionWhat is the purpose of garbage collection in Java, and when is it used?...

  • Java Interview Question: Describe synchronization in respect to multithreading....



  • Java Interview Question: What is HashMap and Map?...





  • Java Interview Question: What is an Iterator?...




  • Java Interview Question: What is final?...

  • C Interview Question: How do I write code that reads data at memory location specified by segment and offset?...



  • C/C++ Data Structures: Breadth First Search: Write code for doing a breadth first search in a Tree data structure...


  • Linked List: Loop/Cycle Detection: Given the head pointer to a singly linked list with a loop or cycle in it...










  • Puzzle: Duplicate Lottery Picks: In the Massachusetts Megabucks lottery, six different numbers from 1 to 42 (inclusive) are selected...


  • Puzzle: The Flawed Game: A teacher was having trouble getting her students to learn their facts, but she noticed that her students...

  • Analytical Questions: One gold bar: You have someone working for you for seven days and you have one gold bar to pay...

  • Algorithms and Coding: Permutations: Write a function to print all the possible permutations...

  • Algorithms and Coding: Web browser: You are developing a web browser (something like e.g. Netscape, etc.)...

  • Algorithms and Coding: Multiple URLs: Since web pages can have multiple URLs pointing to them...




  • Puzzles: Life or Death? The Emperor's Proposition: you are a prisoner sentenced to death. The Emperor offers you...

  • Puzzles:Birthday Line: At a movie theater, the manager announces that they will give a free ticket...

  • Puzzles:Russian Roulette: You are in a game of Russian Roulette with a revolver that has 3...



  • Data Structures: Teddy Bears Puzzle: the game starts when I give you some bears. You can then give back some bears...


  • Data Structures: binary search of the arrayImplement the body of the following function using a binary search of the array... 

  • Data Structures: spanning Tree: What is a spanning Tree? Does the minimum spanning tree of a graph give...

  • Data Structures: JAVA: Suppose that I have the following declarations...

  • Data Structures: JAVA: What are the steps to inserting a new item at the head...

  • Microsoft: Who is taller: 500 men are arranged in an array of 10 rows and 50 columns according to their heights...

  • VC++: Tuple:  Explain tuple in visual c++


  • Google: arrangement of blocks: You are given N blocks of height 1…N. In how many ways can you arrange these blocks...

  • Glove Selection: There are 22 gloves in a drawer: 5 pairs of red gloves, 4 pairs of yellow, and 2 pairs of green...



 

What is the difference between an Interface and an Abstract class?

Solution

 

Explain different ways of using thread?

 

Solution

 


Three spies, suspected as double agents, speak as follows when questioned:

Albert: "Bertie is a mole."
Bertie: "Cedric is a mole."
Cedric: "Bertie is lying."


Assuming that moles lie, other agents tell the truth, and there is just one mole among the three, determine:

1.) Who is the mole?
2.) If, on the other hand there are two moles present, who are they?

Solution



Given twelve marbles that are identical in size, shape, and color, determine which single marble is heavier in weight than the others. You are supplied with a balance and must conclude your determination in three weighings.

Solution

 

Quantitative Questions 

 

A company with ten production lines can produce 1000 computer in five days.  How many computers can this company produce with five lines in seven days?

Solution 

 

 

Data Structures

 

Which data strucutres algorithm used in solving the eight Queens problem?

Solution 

 

 

What pointer type is used to implement the heterogeneous linked list in C?

Solution