There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity sh ...
分类:
其他好文 时间:
2019-09-05 00:55:11
阅读次数:
82
public class MergeTwoSortedLists { /* 解法一:迭代 */ public ListNode mergeTwoLists(ListNode l1, ListNode l2) { if (l1==null) return l2; if (l2==null) ... ...
分类:
其他好文 时间:
2019-09-03 22:16:49
阅读次数:
93
linux中sed引用shell变量 如果变量a或者b有 -、/ 等字符要用 \ 进行转义字符串变量中可以用单引号或者双引号 ,区别:双引号支持变量引用、转义符(比如\n 换行),单引号不支持sed 命令执行时加 -i 参数会把修改应用到源文件上,否则只是屏幕显示 a="one" b="two" # ...
分类:
其他好文 时间:
2019-09-03 16:46:28
阅读次数:
91
原题链接在这里:https://leetcode.com/problems/maximum-length-of-repeated-subarray/ 题目: Given two integer arrays A and B, return the maximum length of an subar ...
分类:
其他好文 时间:
2019-09-03 12:04:03
阅读次数:
89
原题链接在这里:https://leetcode.com/problems/minimum-ascii-delete-sum-for-two-strings/ 题目: Given two strings s1, s2, find the lowest ASCII sum of deleted cha ...
分类:
其他好文 时间:
2019-09-03 10:06:40
阅读次数:
135
原题链接在这里:https://leetcode.com/problems/longest-common-subsequence/ 题目: Given two strings text1 and text2, return the length of their longest common sub ...
分类:
其他好文 时间:
2019-09-03 09:32:48
阅读次数:
62
There are two types of burgers in your restaurant — hamburgers and chicken burgers! To assemble a hamburger you need two buns and a beef patty. To ass ...
分类:
其他好文 时间:
2019-09-02 23:55:35
阅读次数:
202
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 contai ...
分类:
其他好文 时间:
2019-09-02 23:45:38
阅读次数:
97
(1)background: Image registration: the process of overlaying two or more images of the same scene taken at different times from different viewpoints, ...
分类:
其他好文 时间:
2019-09-02 13:33:02
阅读次数:
108
Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST. According to the definition of LCA on Wikipedia ...
分类:
其他好文 时间:
2019-09-02 09:33:29
阅读次数:
78