Implementations of the most common coding interview tasks, focusing on data structures, algorithms, and their complexities.
The top 21 most typical Leetcode/Hackerrank tasks for senior software developer coding interviews focused on data structures, algorithms, and Big O complexities:
# | Task | Solution |
---|---|---|
1 | Two Sum - Find two numbers in an array that add up to a specific target. | Python |
2 | Reverse a Linked List - Reverse a singly linked list. | Python |
3 | Merge Two Sorted Lists - Merge two sorted linked lists. | Python |
4 | Binary Search - Implement binary search in a sorted array. | Python |
5 | Valid Parentheses - Determine if a string of parentheses is valid. | Python |
6 | Maximum Depth of Binary Tree - Find the maximum depth of a binary tree. | Python |
7 | Longest Substring Without Repeating Characters - Find the length of the longest substring without repeating characters. | Python |
8 | Climbing Stairs - Count the number of ways to climb a staircase with n steps, where each time you can climb 1 or 2 steps. | Python |
9 | Find Minimum in Rotated Sorted Array - Find the minimum element in a rotated sorted array. | Python |
10 | Word Ladder - Find the shortest transformation sequence from one word to another. | Python |
11 | Permutations - Generate all possible permutations of a list of numbers. | Python |
12 | Subsets - Generate all possible subsets of a list of numbers. | Python |
13 | Number of Islands - Count the number of islands in a 2D grid. | Python |
14 | Meeting Rooms - Determine if a person can attend all meetings given their start and end times. | Python |
15 | Find Median from Data Stream - Find the median of a stream of numbers. | Python |
16 | Serialize and Deserialize Binary Tree - Convert a binary tree to a string and back to a binary tree. | Python |
17 | Product of Array Except Self - Return an array such that each element is the product of all other elements. | Python |
18 | Kth Largest Element in an Array - Find the k-th largest element in an array. | Python |
19 | Sliding Window Maximum - Find the maximum in each sliding window of size k in an array. | Python |
20 | Longest Increasing Subsequence - Find the length of the longest increasing subsequence in an array. | Python |
21 | Merge Intervals - Merge overlapping intervals in an array of intervals. | Python |
These tasks cover a broad range of essential topics such as arrays, linked lists, trees, graphs, dynamic programming, and sorting, often tested in coding interviews for senior software developers, see at HackerRank, MakeThatContent, IGotAnOffer, or HackerNoon.
There are ready implementations at cnkyrpsgl/leetcode to work with on.