PracHub
QuestionsCoachesLearningGuidesInterview Prep
|Home/Software Engineering Fundamentals/Bitkernel

Detect impossible binary search comparison sequence

Last updated: Mar 29, 2026

Quick Overview

This question evaluates understanding of binary search behavior and algorithmic reasoning about comparison order, search-space elimination, and invariants in sorted arrays.

  • medium
  • Bitkernel
  • Software Engineering Fundamentals
  • Software Engineer

Detect impossible binary search comparison sequence

Company: Bitkernel

Role: Software Engineer

Category: Software Engineering Fundamentals

Difficulty: medium

Interview Round: Take-home Project

Consider binary search on a sorted array of numeric keys. The following options list possible sequences of key values that the algorithm might compare against the search target (in order of comparisons). Assume the keys `180`, `200`, `450`, and `500` are in the array and are ordered so that `180 < 200 < 450 < 500`. Which of the following **cannot** be a sequence of keys compared during a single run of binary search (for some target value) on some sorted array? Options: - A. `500, 200, 450, 180` - B. `500, 450, 200, 180` - C. `180, 500, 200, 450` - D. `180, 200, 500, 450`

Quick Answer: This question evaluates understanding of binary search behavior and algorithmic reasoning about comparison order, search-space elimination, and invariants in sorted arrays.

Related Interview Questions

  • Evaluate C for-loop execution count - Bitkernel (medium)
  • Trace first pass of heap sort - Bitkernel (medium)
  • Find minimum two’s-complement value with three ones - Bitkernel (medium)
  • Identify incorrect statement about sockets - Bitkernel (medium)
  • Solve cups logic puzzle with one true statement - Bitkernel (medium)
|Home/Software Engineering Fundamentals/Bitkernel

Detect impossible binary search comparison sequence

Bitkernel logo
Bitkernel
Oct 24, 2025, 12:00 AM
mediumSoftware EngineerTake-home ProjectSoftware Engineering Fundamentals
3
0

Consider binary search on a sorted array of numeric keys. The following options list possible sequences of key values that the algorithm might compare against the search target (in order of comparisons).

Assume the keys 180, 200, 450, and 500 are in the array and are ordered so that 180 < 200 < 450 < 500.

Which of the following cannot be a sequence of keys compared during a single run of binary search (for some target value) on some sorted array?

Options:

  • A. 500, 200, 450, 180
  • B. 500, 450, 200, 180
  • C. 180, 500, 200, 450
  • D. 180, 200, 500, 450
Loading comments...

Browse More Questions

More Software Engineering Fundamentals•More Bitkernel•More Software Engineer•Bitkernel Software Engineer•Bitkernel Software Engineering Fundamentals•Software Engineer Software Engineering Fundamentals

Write your answer

Your first approved answer each day earns 20 XP.

Sign in to write your answer.
PracHub

Master your tech interviews with 8,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • AI Coding Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.