题目内容 Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. Note: For the purpose of this probl ...
分类:
其他好文 时间:
2020-02-14 12:47:11
阅读次数:
54
1.复习代码 .复习代码 LC 322 322. Coin Change Medium 2970100Add to ListShare You are given coins of different denominations and a total amount of money amount. ...
分类:
其他好文 时间:
2020-02-14 10:53:04
阅读次数:
94
1 """ 2 We are given the head node root of a binary tree, where additionally every node's value is either a 0 or a 1. 3 Return the same tree where eve ...
分类:
其他好文 时间:
2020-02-13 22:59:44
阅读次数:
82
1 """ 2 Given a binary tree, return the inorder traversal of its nodes' values. 3 Example: 4 Input: [1,null,2,3] 5 1 6 \ 7 2 8 / 9 3 10 Output: [1,3,2 ...
分类:
其他好文 时间:
2020-02-13 22:54:06
阅读次数:
53
1 """ 2 Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the give ...
分类:
其他好文 时间:
2020-02-13 22:44:08
阅读次数:
62
1 """ 2 Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number. 3 An example is the root-to-leaf path 1- ...
分类:
其他好文 时间:
2020-02-13 22:42:21
阅读次数:
82
1 """ 2 Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree. 3 According to the definition of LCA on Wikipedia: ...
分类:
其他好文 时间:
2020-02-13 22:33:56
阅读次数:
67
Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if: Op ...
分类:
其他好文 时间:
2020-02-13 21:05:49
阅读次数:
52
题目内容 Given a singly linked list, determine if it is a palindrome. Example: 分析过程 题目归类: 链表反转,fast/slow双指针法 题目分析: 这道题归到easy其实是不对的,应该归到medium,因为如果要考虑O(n)时 ...
分类:
其他好文 时间:
2020-02-13 15:00:47
阅读次数:
64
You are given two integer arrays nums1 and nums2 sorted in ascending order and an integer k. Define a pair (u,v) which consists of one element from th ...
分类:
其他好文 时间:
2020-02-13 13:22:48
阅读次数:
67