【2】Add Two Numbers 【19】Remove Nth Node From End of List 【21】Merge Two Sorted Lists 【23】Merge k Sorted Lists 【24】Swap Nodes in Pairs 【25】Reverse Nodes ...
分类:
其他好文 时间:
2018-10-16 13:41:14
阅读次数:
240
Two elements of a binary search tree (BST) are swapped by mistake. Recover the tree without changing its structure. Example 1: Example 2: Follow up: A ...
分类:
其他好文 时间:
2018-10-16 10:19:01
阅读次数:
141
Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively. Below is one possible representati ...
分类:
其他好文 时间:
2018-10-16 10:16:48
阅读次数:
174
一、题目 1、审题 2、分析 给出一个升序的整形数组,当两个元素之和为 target ,输出这两个元素的下标。(只有一组符合的数) 二、解答 1、思路: 方法一、 采用两个指针,start 从前向后移动,end 从后向前移动;当 num[start] + num[end] = target 时,输出 ...
分类:
其他好文 时间:
2018-10-16 02:05:36
阅读次数:
305
Swap HDU - 2819 Given an N*N matrix with each entry equal to 0 or 1. You can swap any two rows or any two columns. Can you find a way to make all the ...
分类:
其他好文 时间:
2018-10-16 01:45:38
阅读次数:
245
leetcode1 twosum approach2: https://leetcode.com/problems/two-sum/solution/# Map-doc->hashmap: https://docs.oracle.com/javase/8/docs/api/java/util/Has ...
分类:
移动开发 时间:
2018-10-15 23:14:45
阅读次数:
253
【2】Add Two Numbers 【7】Reverse Integer 【8】String to Integer (atoi) 【9】Palindrome Number 【12】Integer to Roman 【13】Roman to Integer 【29】Divide Two Intege ...
分类:
其他好文 时间:
2018-10-15 14:55:21
阅读次数:
211
Given two non-empty binary trees s and t, check whether tree t has exactly the same structure and node values with a subtree of s. A subtree of s is a ...
分类:
其他好文 时间:
2018-10-15 11:52:49
阅读次数:
128
findKthNumber是在当前范围内第k小的数。 https://www.cnblogs.com/lupx/p/lupeixin.html ...
分类:
其他好文 时间:
2018-10-14 21:59:37
阅读次数:
131
分析 难度:易 题目 Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two list ...
分类:
其他好文 时间:
2018-10-14 20:46:09
阅读次数:
178