Summer Employee

Summer Employee Interview Questions and Answers

Updated 20 May 2017

Q1. Given 10 balls which weigh the same, except for one, and a beam balance, what is the minimum number of weighs to find the odd ball?

Ans.

The minimum number of weighs to find the odd ball is 4.

  • Divide the 10 balls into 3 groups of 3, 3, and 4.

  • Compare the weights of the two groups of 3 balls.

  • If the weights are equal, the odd ball is in the group of 4.

  • If the weights are unequal, the odd ball is in the lighter group of 3.

  • Divide the lighter group of 3 balls into individual balls and compare their weights.

  • The odd ball will be identified in the 4th weigh.

Q2. Given an island in the center of a lake, and you are standing outside the lake, how would you reach the center?

Ans.

To reach the center of the island, one can use a boat or any other means to cross the lake.

  • Use a boat to reach the island

  • Swim across the lake if it's not too far

  • If the lake is frozen, walk or skate across the ice

  • If there is a bridge or causeway connecting the island, use it to reach the center

Q3. How would you design an elevator system for a building?

Ans.

Designing an elevator system for a building involves considering factors like capacity, speed, safety, and efficiency.

  • Determine the number of floors and the expected traffic flow in the building

  • Calculate the required capacity and speed of the elevators

  • Consider safety features such as emergency stop buttons, fire-resistant materials, and backup power supply

  • Implement efficient algorithms for elevator scheduling to minimize waiting time

  • Incorporate user-friendly features like cle...read more

Q4. How would you code a linked list? Show the code

Ans.

A linked list is a data structure where each element contains a reference to the next element.

  • Create a Node class with data and next pointer

  • Create a LinkedList class with head pointer

  • Implement methods like insert, delete, search, etc.

Are these interview questions helpful?

Q5. What is the difference between OOP and procedural programming?

Ans.

OOP focuses on objects and their interactions, while procedural programming focuses on procedures and functions.

  • OOP organizes code into objects that encapsulate data and behavior.

  • Procedural programming uses functions to manipulate data.

  • OOP supports concepts like inheritance, polymorphism, and encapsulation.

  • Procedural programming is more straightforward and linear in nature.

  • OOP promotes code reusability and modularity.

  • Procedural programming is often used for small-scale projec...read more

Q6. When would Java be used over C/C++?

Ans.

Java is used over C/C++ when platform independence, ease of use, and security are important.

  • Java is platform independent, meaning it can run on any operating system or hardware that has a Java Virtual Machine (JVM). C/C++ code needs to be compiled separately for each platform.

  • Java has automatic memory management, reducing the risk of memory leaks and making it easier to write and maintain code. C/C++ requires manual memory management.

  • Java has built-in security features, such ...read more

Share interview questions and help millions of jobseekers 🌟

man-with-laptop

Summer Employee Jobs

0
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Interview experiences of popular companies

4.0
 • 550 Interviews
3.6
 • 399 Interviews
View all

Calculate your in-hand salary

Confused about how your in-hand salary is calculated? Enter your annual salary (CTC) and get your in-hand salary

Summer Employee Interview Questions
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+

Reviews

4 L+

Interviews

4 Cr+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter