Python Backend Practice Questions (Intermediate
to Advanced)
List (Advanced Logic)
1 Find pairs with given sum using hashing
2 Find subarrays with sum = k
3 Sliding window maximum
4 Longest consecutive sequence
5 Detect duplicate within k distance
6 Merge overlapping intervals
7 Kth largest element without sorting
8 Rotate list in-place
9 Product of array except self
10 Detect cycle in list
Tuple
1 Group tuples by first element
2 Sort tuples by multiple keys
3 Convert tuple list to nested dictionary
4 Find most frequent tuple
5 Flatten tuple pairs
Set
1 Intersection of multiple lists
2 Duplicate detection within range
3 Find missing numbers
4 Check permutations
5 Unique session tracker
Dictionary (Core Backend)
1 Implement LRU Cache
2 Top k frequent elements
3 Group anagrams
4 Build inverted index
5 Rate limiter system
6 Nested dictionary traversal
7 Merge dictionaries
8 Word frequency counter
Mixed Problems
1 Log analyzer (user activity)
2 Most active user
3 Common users across systems
4 Duplicate transactions
5 Mini search engine logic
Backend Problems
1 Task manager logic
2 Find user by ID in O(1)
3 Pagination system
4 Notification system
5 Fraud detection
6 Tag-based filtering
Hard / Interview
1 Group transactions by date
2 First non-repeating character
3 Two sum with indices
4 Longest substring without repeat
5 Cache with expiry
6 Recommendation system
System Design Style
1 URL shortener logic
2 Vote counting system
3 Chat storage system
4 Search autocomplete