LeetCode 51. N-Queens
Description https://leetcode.com/problems/n-queens/ The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other. Given…
Be a Good Techer and Tech for Good. www.goodtecher.com
Description https://leetcode.com/problems/n-queens/ The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other. Given…
Description https://leetcode.com/problems/sort-colors/ Write a program to solve a Sudoku puzzle by filling the empty cells. A sudoku solution must satisfy all of the…
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 =…