Binary Search Comparisons on Sorted Price Levels - Quant Trader Interview Question
Difficulty: Easy
Category: Algorithms & Data Structures
Practice quant interview questions from top firms including Jane Street, Citadel, Two Sigma, DE Shaw, and other leading quantitative finance companies.
Topics: binary-search, algorithms, data-structures, logarithm, trading
Problem Description
You are building a high-frequency trading system and need to quickly find specific price levels within the order book. The order book contains a sorted array of 1 million unique price levels. You implement a binary search algorithm to locate the desired price. What is the maximum number of comparisons the binary search algorithm will need to make in the worst-case scenario to find (or determine the absence of) a target price within the array?
Practice this easy trader interview question on MyntBit - the all-in-one quant learning platform with 200+ quant interview questions for Jane Street, Citadel, Two Sigma, and other top quantitative finance firms.