Here are 20 of the most common LeetCode questions that frequently come up in software engineering interviews:
-
Two Sum - Given an array of integers, return indices of the two numbers that add up to a target sum.
-
Reverse Integer - Reverse digits of a signed integer and return result within integer range.
-
Longest Substring Without Repeating Characters - Find the length of the longest substring without repeating characters.
-
Merge Two Sorted Lists - Merge two sorted linked lists into one sorted list.
-
Palindrome Number - Determine if a given number is a palindrome by ignoring case and formatting.
-
Valid Parentheses - Check if a string of parentheses is valid or not.
-
Remove Duplicates from Sorted Array - Remove duplicate elements from a sorted array.
-
String to Integer (atoi) - Implement strtol() function to convert a string to an integer.
-
Median of Two Sorted Arrays - Find the median of two sorted arrays of integers.
-
Container With Most Water - Find maximum area of a rectangle in a histogram.
-
Longest Palindromic Substring - Find the longest palindromic substring in a given string.
-
3Sum - Find all unique triplets in an array that sum to zero.
-
Zigzag Conversion - Convert a string to a zigzag pattern of rows.
-
Minimum Path Sum - Find minimum path sum from top left to bottom right in a matrix.
-
4Sum - Find all unique quadruplets in an array that sum to a target value.
-
Valid Anagram - Determine if two strings are anagrams ignoring case and whitespace.
-
Subsets - Find all subsets of a set with given distinct integers.
-
Permutations - Print all permutations of a string.
-
Group Anagrams - Group anagrams together from a list of strings.
-
Happy Number - Determine if a number is happy or not through iterative process.
I'd recommend practicing these questions first before moving on to other problems on LeetCode. Let me know if any of these need more explanation.