返回题库

Quant Interview Practice Questions

专题
Number Theory & Algorithms
难度
L2
来源
MyntBit

题目详情

You are building an order book for a high-frequency trading system. The order book needs to efficiently support the following operations:

  1. Insertion: Adding new orders at specific price levels.
  2. Best Bid/Ask Retrieval: Quickly finding the highest bid price and the lowest ask price. Price levels are represented as keys. You are considering using either a HashMap or a balanced Binary Search Tree (BST), such as a TreeMap, to store the price levels and their corresponding orders. Why is a bala