Q121. How does binary search work and what are its pitfalls?
Binary search finds a target in a sorted array by halving the search range each step, giving O(log n). ```python def binary_search(nums, target): lo, hi = 0, len(nums) - ...
Technical Question Bank · Peer-Reviewed
Search and filter frequently asked interview questions across technical, programming, and behavioral domains. Tailor your interview preparation by difficulty for freshers or experienced developers (2,728 available).
Binary search finds a target in a sorted array by halving the search range each step, giving O(log n). ```python def binary_search(nums, target): lo, hi = 0, len(nums) - ...
- ArrayList: array-backed, O(1) random access, amortised O(1) append, O(n) insertion/removal in the middle. Best default for ordered lists. - LinkedList: doubly linked, O...
**SQL** stands for **Structured Query Language**. Originally developed at IBM by Donald D. Chamberlin and Raymond F. Boyce in the early 1970s, it was initially named **SE...
Streams process data in chunks instead of buffering everything, which keeps memory flat for large files and real-time traffic. Four types: - Readable: source of data (fs....
A generator is a function that yields values lazily using yield. Calling it returns a generator object that produces items on demand and remembers its position, so memory...
Never concatenate user input into SQL. Use prepared statements with bound parameters, which separate code from data. ```php $stmt = $pdo->prepare('SELECT * FROM users WHE...
- Flexbox is one-dimensional: it distributes space along a single main axis (row or column). Best for toolbars, navigation, card content, alignment, and components whose ...
Generics let you write code that works over many types while preserving the relationship between input and output types. ```ts function first(items: T[]): T | undefined {...
The prototype chain is a core concept in JavaScript’s inheritance model. It allows objects to inherit properties and methods from other objects. When you try to access a ...
React offers a powerful set of features that have made it one of the most popular JavaScript libraries for building user interfaces: **Core Features:** - **Component-Base...
HireXTech uses essential storage to remember your study preferences and third-party advertising cookies via Google AdSense in compliance with GDPR. You can choose to enable essential cookies only or accept all cookies. Read our Privacy Policy.