Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Table of contents
1.
Introduction
2.
Puzzle Description
3.
Solution
4.
Frequently Asked Questions
4.1.
What is a puzzle interview?
4.2.
How to prepare for a puzzle interview?
4.3.
What is the benefit of using a puzzle question in an interview?
4.4.
What Is a Situational Interview Question? 
5.
Conclusion
Last Updated: Mar 27, 2024

Place the Numbers

Author Tashmit
0 upvote
Leveraging ChatGPT - GenAI as a Microsoft Data Expert
Speaker
Prerita Agarwal
Data Specialist @
23 Jul, 2024 @ 01:30 PM
Interview Puzzles

Introduction

A puzzle is a magnificent measure of one's analytical skills and lateral thinking. Many product-based companies ask the riddles to help them filter candidates based on their real-world problem-solving skills to approach a problem they have not seen before.

A puzzle may have multiple solutions. The interviewer is generally interested in the candidate's approach to solving the mystery and the approach to building and thinking creatively about the answer to the puzzle.

On the same note, we will discuss an exciting puzzle commonly asked in interviews; Place the numbers.

Puzzle Description

Assume you are given a sequence of numbers 1,2,3,4,5,6,7,8. You are supposed to place the numbers in the following order such that no two numbers are adjacent according to the series. For example, one can not be adjacent to 2 but adjacent to 3, 4, 5, 6, 7, 8. Similarly, place the number accordingly.

Illustration Image

Get the tech career you deserve, faster!
Connect with our expert counsellors to understand how to hack your way to success
User rating 4.7/5
1:1 doubt support
95% placement record
Akash Pal
Senior Software Engineer
326% Hike After Job Bootcamp
Himanshu Gusain
Programmer Analyst
32 LPA After Job Bootcamp
After Job
Bootcamp

Solution

The first step is to place 1 and 8 because they have only one adjacent number; 2 and 7. We can put 2 and 7 adjacent to 8 and 1, respectively. Now it is easy to place the numbers that are remaining. The final result would be

Illustration Image

Check out this problem - 8 Queens Problem

Frequently Asked Questions

What is a puzzle interview?

Microsoft popularized the puzzle interview in the 1990s. Puzzle interviewers ask applicants to solve puzzles to check their analytical thinking skills.

How to prepare for a puzzle interview?

First of all, think about the problem and carefully understand the question interviewer is trying to ask. Ask for any clarifications, if there are any. Lastly, don't just tell the answer, but clearly explain the solution.

What is the benefit of using a puzzle question in an interview?

This assessment enables the interviewer to assert the candidate's logical reasoning problems and questions to test lateral thinking, which is essential for most analytics job interviews.

What Is a Situational Interview Question? 

A situational interview question deals with hypothetical situations in the future and what you would do in that situation.  

Conclusion

This article extensively discussed Place the number and provided its solution. 

Recommended Readings:


Do check out The Interview guide for Product Based Companies as well as some of the Popular Interview Problems from Top companies like Amazon, Adobe, Google, etc. on Coding Ninjas Studio.

Also check out some of the Guided Paths on topics such as Interview Puzzles, Data Structure and Algorithms, Competitive Programming, Operating Systems, Computer Networks, DBMS, System Design, etc. as well as some Contests, Test Series, Interview Bundles, and some Interview Experiences curated by top Industry Experts only on Coding Ninjas Studio.

Live masterclass