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 […]

Continue## LeetCode 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 […]

Continue## LeetCode 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 […]

Continue## LeetCode 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)$ […]

Continue## LeetCode 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 […]

Continue## A 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 […]

Continue## Lessons 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 […]

Continue## Quora: 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.

Continue## Quora: 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## Quora: Why Don’t Coding Interviews Test Job Skills?

Would software engineers like coding interviews better if they tested real-world skills? Why are LeetCode-type problems used as the standard when interviewing for software developer roles, when those types of problems usually don’t reflect the actual type of work the employees do? (answer) I’m doing most of my writing on Quora this year. For more […]

Continue- « Previous Page
- 1
- 2
- 3
- 4
- …
- 33
- Next Page »