Language Selection
Choose your preferred programming language
Showing: Python
Overview
Sorting and searching are fundamental algorithmic techniques. This section covers classic algorithms and their practical applications in interview problems.
Key Concepts
- Binary search and variants
- Quick sort and merge sort
- Counting sort and radix sort
- Search in rotated arrays
- Finding kth element
- Custom comparators
Common Problems
Easy
- Binary Search
- Search Insert Position
- First Bad Version
- Sqrt(x)
Medium
- Search in Rotated Sorted Array
- Find Peak Element
- Kth Largest Element
- Merge Intervals
Hard
- Median of Two Sorted Arrays
- Count of Smaller Numbers After Self
- Maximum Gap
Practice Tips
- Binary search template: Master the basic template
- Sorted input: Look for opportunities to use binary search
- Time complexity: Know when O(n log n) is acceptable
- Stability: Understand when sort stability matters