Alien Dictionary There is a new alien language which uses the latin alphabet. However, the order among letters…
分类:LeetCode题目解答
[LeetCode] Sqrt(x) 求平方根
Implement int sqrt(int x). Compute and return the square root of x. 这道题要求我们求平方根,我们能想到的…
[LeetCode] Strobogrammatic Number III 对称数之三
A strobogrammatic number is a number that looks the same when rotated 180 degrees (looked at upside dow…
[LeetCode] H-Index 求H指数
Given an array of citations (each citation is a non-negative integer) of a researcher, write a function…
[LeetCode] K-th Smallest in Lexicographical Order 字典顺序的第K小数字
Given integers n and k, find the lexicographically k-th smallest integer in the range fr…
LeetCode | Binary Tree Preorder Traversal
题目: Given a binary tree, return the preorder traversal of its nodes’ values. For example: Give…
48. Rotate Image
48. Rotate Image 题目 You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (cl…
38. Count and Say
题目 The count-and-say sequence is the sequence of integers with the first five terms as following: 1. 1 2. 11 3…
107. Binary Tree Level Order Traversal II
欢迎fork and star:Nowcoder-Repository-github 107. Binary Tree Level Order Traversal II 题目 Given a binary tree, r…
131. Palindrome Partitioning
欢迎fork and star:Nowcoder-Repository-github 131. Palindrome Partitioning 题目 Given a string s, partition s such …
[LeetCode] IP to CIDR 将IP地址转为CIDR无类别域间路由
Given a start IP address ip and a number of ips we need to cover n, return a representation of the rang…
[Leecode] Linked List Cycle 链表环
Linked List Cycle I Given a linked list, determine if it has a cycle in it. Follow up: Can you solve it withou…