Description: Given a singly linked list, determine if it is a palindrome. Link: https://leetcode.com/problems/palindrome-linked-list/ Examples: Exampl ...
分类:
其他好文 时间:
2020-12-05 11:02:42
阅读次数:
7
package LeetCode_771 /** * 771. Jewels and Stones * https://leetcode.com/problems/jewels-and-stones/ * You're given strings J representing the types o ...
分类:
其他好文 时间:
2020-12-05 10:48:43
阅读次数:
7
Given n non-negative integers a1, a2, ..., an , where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endp ...
分类:
其他好文 时间:
2020-12-04 11:23:41
阅读次数:
6
###题目 1389. Create Target Array in the Given Order ###解题方法 创建一个新数组rat,将nums中的数按照index的位置插入rat即可。 时间复杂度:O(n*n) 空间复杂度:O(n) ###代码 class Solution: def cre ...
分类:
其他好文 时间:
2020-12-04 11:06:02
阅读次数:
6
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order, and each of their nodes conta ...
分类:
其他好文 时间:
2020-11-26 15:14:07
阅读次数:
5
Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are sorted i ...
分类:
其他好文 时间:
2020-11-25 12:59:50
阅读次数:
14
Difficulty: Medium Related Topics: String, Backtracking Link: https://leetcode.com/problems/letter-combinations-of-a-phone-number/ Description Given a ...
分类:
移动开发 时间:
2020-11-21 12:45:15
阅读次数:
31
##题面 You are given a sequence of n integers a1 , a2 , ... , an in non-decreasing order. In addition to that, you are given several queries consisting ...
分类:
其他好文 时间:
2020-11-21 12:28:36
阅读次数:
7
You are given a perfect binary tree where all leaves are on the same level, and every parent has two children. The binary tree has the following defin ...
分类:
其他好文 时间:
2020-11-20 12:00:39
阅读次数:
9
##1.1 SAT SAT. Given a CNF formula Φ, does it have a satisfying truth assignment? 可满足性要求的是结果为TRUE! ###1.1.1 3-SAT SAT: where each clause contains exac ...
分类:
其他好文 时间:
2020-11-19 12:40:04
阅读次数:
9