Leetcode

May 16, 2025 Leetcode

Path Sum

Given the root of a binary tree and an integer targetSum, return true if the tree has a root-to-leaf path.

Read more →
Jun 21, 2025 Leetcode

Nth Digit

Given an integer n, return the nth digit of the infinite integer sequence [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ...].

Read more →
Jun 13, 2025 Leetcode

My Calendar I

You are implementing a program to use as your calendar. We can add a new event if adding the event will not cause a double booking.

Read more →
Apr 21, 2025 Leetcode

Add Strings

Given two non-negative integers, num1 and num2 represented as string, return the sum of num1 and num2 as a string.

Read more →
May 06, 2025 Leetcode

Jump Game

You are given an integer array nums. You are initially positioned at the array's first index, and each element in the array represents your maximum jump length.

Read more →
Apr 09, 2025 Leetcode

Reverse Integer

Given a signed 32-bit integer x, return x with its digits reversed. If reversing x causes the value to go outside the signed 32-bit integer range.

Read more →
Apr 08, 2025 Leetcode

554 Brick Wall

There is a rectangular brick wall in front of you with n rows of bricks. The ith row has some number of bricks each of the same height (i.e., one unit)

Read more →
Apr 18, 2025 Leetcode

Binary Watch

A binary watch has 4 LEDs on the top to represent the hours (0-11), and 6 LEDs on the bottom to represent the minutes (0-59). Each LED represents a zero or one.

Read more →
Jun 04, 2025 Leetcode

Maximum Binary Tree

You are given an integer array nums with no duplicates. A maximum binary tree can be built recursively from nums using the following algorithm.

Read more →
Mar 16, 2025 Leetcode

Two Sum Problem

LeetCode Problem 1. Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.

Read more →
May 27, 2025 Leetcode

Longest Univalue Path

Given the root of a binary tree, return the length of the longest path, where each node in the path has the same value. This path may or may not pass through.

Read more →
May 29, 2025 Leetcode

Delete Node in a BST

Given a root node reference of a BST and a key, delete the node with the given key in the BST. Return the root node reference (possibly updated) of the BST.

Read more →
Apr 17, 2025 Leetcode

Longest Palindrome

Given a string s which consists of lowercase or uppercase letters, return the length of the longest palindrome that can be built with those letters.

Read more →
Apr 26, 2025 Leetcode

Rotated Digits

An integer x is a good if after rotating each digit individually by 180 degrees, we get a valid number that is different from x. Each digit must be rotated.

Read more →
May 12, 2025 Leetcode

Permutations

Given an array nums of distinct integers, return all the possible permutations. You can return the answer in any order.

Read more →