Problem LeetCode 47: Permutations II (Medium) Problem Statement: Given a list of integers that may contain duplicates, return all possible unique permutations of those integers, in any order. A permutation is an arrangement of elements. For example, the three elements [1,2,3] can be arranged into $3!=6$ unique permutations: [1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], and [3,2,1]. […]
ContinueLeetCode 897: Increasing Order Search Tree
Problem LeetCode 897: Increasing Order Search Tree (Easy) Problem Statement: Given a binary search tree (BST), rearrange it (preserving the BST order) so that the lowest node is at the root and each node only has a right child. The result is like a sorted linked list. The problem doesn’t mention any space requirements, and […]
ContinueLeetCode 394: Decode String
Problem LeetCode 394: Decode String (Medium) Problem Statement: Decode a string that has been encoded in a specified format. In the encoded string, k[str] means decode the string str and repeat the result k times. The input encoding is always valid: k is always a positive integer, there is no extra whitespace, the square brackets […]
ContinueLeetCode 1022: Sum of Root To Leaf Binary Numbers
Problem LeetCode 1022: Sum of Root To Leaf Binary Numbers (Easy) Problem statement: Given a binary tree where each node contains a binary digit, interpret each path from the root to a leaf as a binary number, with the root value as the high-order bit. Return the sum of these numbers. Solution This problem is […]
ContinueLeetCode 1288: Remove Covered Intervals
Problem LeetCode 1288: Remove Covered Intervals (Medium) Problem statement: Given a list of intervals, return the number of intervals that are not covered by another interval in the list. For this problem, think of an interval as a segment of the number line with integer starting and ending points. For example, the interval $(-1, 1)$ […]
ContinueLeetCode 227: Basic Calculator II
Problem LeetCode 227: Basic Calculator II (Medium) Problem statement: Evaluate a valid arithmetic expression containing only numbers, spaces, and the operators +, -, *, and /. This is almost as simple as an arithmetic expression evaluator can be. It’s simpler than the first Basic Calculator problem, which includes parentheses. The only trick in this version […]
ContinueA Project for 2021
In the geeky world of programming puzzles, programming interviews, and competitive programming (loosely defined), LeetCode is one of the major players. And on LeetCode, 2021 begins with another month of LeetCoding Challenges. In my 2020 wrap-up post last week, I described the process that I use to get the most out of these challenges. I […]
ContinueLessons from the 2020 LeetCode Monthly Challenges
In late March of this year, the coding interview preparation site LeetCode announced a 30-Day LeetCoding Challenge. Each day during the month of April, they selected one of the coding problems from their archive and challenged developers to solve it within 24 hours. Newly locked-down developers throughout the world took up the challenge, earning LeetCoins […]
ContinueQuora: Are Math Courses Useful for Competitive Programming?
Competitive programming seems to have a lot to do with math and algorithms, so it’s reasonable to ask: Does taking more mathematics classes improve competitive programming? (answer) I’m doing most of my writing on Quora this year. For more information, see A Project for 2020.
ContinueQuora: Are Take-Home Assignments a Good Interview Technique?
As an alternative or supplement to LeetCode problems, what about using take-home assignments in interviews? Why do some companies give take home coding assessment as anyone could easily look up on how to solve those? (answer) I’m doing most of my writing on Quora this year. For more information, see A Project for 2020.
Continue- « Previous Page
- 1
- …
- 16
- 17
- 18
- 19
- 20
- …
- 49
- Next Page »