factorial-trailing-zeroes fan-zhuan-dan-ci-shun-xu-lcof fan-zhuan-lian-biao-lcof fancy-sequence fei-bo-na-qi-shu-lie-lcof fi9suh fibonacci-number filling-bookcase-shelves filter-elements-from-array final-prices-with-a-special-discount-in-a-shop final-value-of-variable-after-per...
public class Solution { public String getPermutation(int n, int k) { ArrayList<Integer> list = new ArrayList<>(); int factorial = 1; for (int i = 1; i <= n; i++) { list.add(i); factorial *= i; } // !!! k = k-1; StringBuilder sb = new StringBuilder(); for (int i...
随着做过的题越来越多,我觉得我需要一个目录来让我飞快的找到题目。
Even if one subtree is none while the other is not, you don't need to print anything for the none subtree but still need to leave the space as large as that for the other subtree. However, if two subtrees are none, then you don't need to leave space for both of them. Each unus...
172 Factorial Trailing Zeroes Medium JavaScript 173 Binary Search Tree Iterator Medium Rust 179 Largest Number Medium JavaScript 187 Repeated DNA Sequences Medium JavaScript 189 Rotate Array Medium JavaScript 190 Reverse Bits Easy JavaScript 191 Number of 1 Bits Easy JavaScript 198 House Robber Medium ...
1006 Clumsy Factorial 53.70% Medium 1005 Maximize Sum Of Array After K Negations 52.40% Easy 1004 Max Consecutive Ones III 60.50% Medium 1003 Check If Word Is Valid After Substitutions 56.10% Medium 1002 Find Common Characters 68.10% Easy 1001 Grid Illumination 36.60% Hard 1000 Minimum Cost to...
795 Number of Subarrays with Bounded Maximum Algorithms Medium 794 Valid Tic-Tac-Toe State Algorithms Medium 793 Preimage Size of Factorial Zeroes Function Algorithms Hard 792 Number of Matching Subsequences Algorithms Medium 791 Custom Sort String Algorithms Medium 790 Domino and Tromino Tiling Algorithm...
Factorial Trailing Zeroes 173. Binary Search Tree Iterator 174. Dungeon Game 179. Largest Number 187. Repeated DNA Sequences 190. Reverse Bits 191. Number of 1 Bits 198. House Robber 199. Binary Tree Right Side View 200. Number of Islands 201. Bitwise AND of Numbers Range 202. Happy ...
172 Factorial Trailing Zeroes 28.3% Easy 171 Excel Sheet Column Number 36.6% Easy 170 Two Sum III – Data structure design 24.7% Easy 169 Majority Element 34.9% Easy 168 Excel Sheet Column Title 18.1% Easy 167 Two Sum II – Input array is sorted 43.3% Medium 166 Fraction to Recurring Deci...
104 Maximum Depth of Binary Tree // #104二叉树最大深度 描述:如题。 //#104Description: Maximum Depth of Binary Tree | LeetCode OJ 解法1:递归。 // Solution 1: Recursion. 代码1 //Code 1 105 Construct Binary Tree from Preorder and Inorder Traversal ...