题目链接 https://leetcode-cn.com/problems/merge-two-sorted-lists/description/ 题目分析 两个链表已排序 新链表应该是两个链表拼接起来的,而非new出来的 链表中头结点的val应该是有意义的 题解一:迭代 思路 先new一个无意义的 ...
分类:
其他好文 时间:
2020-07-11 19:10:40
阅读次数:
83
A Bug's Life Background Professor Hopper is researching the sexual behavior of a rare species of bugs. He assumes that they feature two different gend ...
分类:
其他好文 时间:
2020-07-11 17:33:44
阅读次数:
54
A substring of a string T is defined as: T(i, k)=TiTi+1...Ti+k-1, 1≤i≤i+k-1≤|T|. Given two strings A, B and one integer K, we define S, a set of tripl ...
分类:
编程语言 时间:
2020-07-11 13:09:02
阅读次数:
71
归并排序: 先分治后归并。 edit play_arrow brightness_4 /* Java program for Merge Sort */ class MergeSort { // Merges two subarrays of arr[]. // First subarray is ...
分类:
编程语言 时间:
2020-07-10 23:51:51
阅读次数:
78
题目链接 https://leetcode-cn.com/problems/intersection-of-two-linked-lists/ 初次读题 初次读题可知 两个指针相同即需要求得的结果 链表长度可能不同 两个链表可能没有交叉点,此时返回NULL 不可修改链表结构 链表中无循环 我第一次读 ...
分类:
其他好文 时间:
2020-07-10 23:51:38
阅读次数:
63
题目 Given two binary strings, return their sum (also a binary string). The input strings are both non-empty and contains only characters 1 or 0. Exampl ...
分类:
其他好文 时间:
2020-07-10 20:58:33
阅读次数:
56
LC148 two-sum 题意:数组中找出两个加起来等于目标值的数 题解:unordered存值对应下标,注意相同数的特判 LC147 median-of-two-sorted-arrays 题意:两个有序数组中位数 题解:Kth(A,m,B,n,k),若m>n交换,pa=min(k/2,m),p ...
分类:
其他好文 时间:
2020-07-10 15:23:31
阅读次数:
60
package LeetCode_680 /** * 680. Valid Palindrome II * https://leetcode.com/problems/delete-operation-for-two-strings/description/ * * Given two words ...
分类:
其他好文 时间:
2020-07-10 09:29:42
阅读次数:
68
#Code-Output File-Two Way July 9, 2020 9:25 PM ##1.使用ofstream 输出 #include <fstream> SYSTEMTIME st; GetLocalTime(&st); CString strTime; strTime.Format( ...
分类:
其他好文 时间:
2020-07-09 22:11:03
阅读次数:
73
在模块化编程中,开发者将程序分解成离散功能块(discrete chunks of functionality),并称之为模块。 每个模块具有比完整程序更小的接触面,使得校验、调试、测试轻而易举。 精心编写的模块提供了可靠的抽象和封装界限,使得应用程序中每个模块都具有条理清楚的设计和明确的目的。 N ...
分类:
Web程序 时间:
2020-07-09 12:39:02
阅读次数:
80