208. Implement Trie (Prefix Tree)

Problem description:

Implement a trie with insert, search, and startsWith methods.

Readmore

88. Merge Sorted Array

Problem description:

Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array.

Readmore

278. First Bad Version

Problem description:

You are a product manager and currently leading a team to develop a new product. Unfortunately, the latest version of your product fails the quality check. Since each version is developed based on the previous version, all the versions after a bad version are also bad.

Readmore

325. Maximum Size Subarray Sum Equals k

Problem description:

Given an array nums and a target value k, find the maximum length of a subarray that sums to k. If there isn’t one, return 0 instead.

Readmore

277. Find the Celebrity

Problem description:

Suppose you are at a party with n people (labeled from 0 to n - 1) and among them, there may exist one celebrity. The definition of a celebrity is that all the other n - 1 people know him/her but he/she does not know any of them.

Readmore

133. Clone Graph

Problem description:

Clone an undirected graph. Each node in the graph contains a label and a list of its neighbors.

Readmore

791. Custom Sort String

Problem description:

S and T are strings composed of lowercase letters. In S, no letter occurs more than once.

Readmore

125. Valid Palindrome

Problem description:

Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.

Readmore

257. Binary Tree Paths

Problem description:

Given a binary tree, return all root-to-leaf paths.

Readmore

247. Strobogrammatic Number II

Problem description:

A strobogrammatic number is a number that looks the same when rotated 180 degrees (looked at upside down).

Readmore