LeetCode 75. Sort Colors
Description https://leetcode.com/problems/sort-colors/ Given an array nums with n objects colored red, white, or blue, sort them in-place so that objects of the same color are adjacent,…
Be a Good Techer and Tech for Good. www.goodtecher.com
Description https://leetcode.com/problems/sort-colors/ Given an array nums with n objects colored red, white, or blue, sort them in-place so that objects of the same color are adjacent,…
Description https://leetcode.com/problems/binary-tree-zigzag-level-order-traversal/ Given the root of a binary tree, return the zigzag level order traversal of its nodes’ values. (i.e., from left to…
Description https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/ Given preorder and inorder traversal of a tree, construct the binary tree. Note:You may assume that duplicates do…
Description https://leetcode.com/problems/kth-smallest-element-in-a-bst/ Given the root of a binary search tree, and an integer k, return the kth (1-indexed) smallest element in the tree. Example 1: Input: root…
Description https://leetcode.com/problems/word-search/ Given a 2D board and a word, find if the word exists in the grid. The word can…
Description https://leetcode.com/problems/generate-parentheses/ Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. Example 1: Input: n = 3…
Description https://leetcode.com/problems/permutations/ Given an array nums of distinct integers, return all the possible permutations. You can return the answer in any order. Example 1:…
Description https://leetcode.com/problems/top-k-frequent-elements/ Given a non-empty array of integers, return the k most frequent elements. Example 1: Input: nums = [1,1,1,2,2,3], k =…
Description https://leetcode.com/problems/kth-largest-element-in-an-array/ Find the kth largest element in an unsorted array. Note that it is the kth largest element in the…
Description https://leetcode.com/problems/find-peak-element/ A peak element is an element that is strictly greater than its neighbors. Given an integer array nums, find…