Two Sum 题目 "链接" 题目描述 给定一个 类型数组,要求返回其中两个数字的索引,使得它们的和为指定的目标值。 约定 1. 每个给定输入有且只有1种结果。 2. 返回的两个索引不能为同一个值。 示例 解答 ...
分类:
其他好文 时间:
2018-12-16 23:27:59
阅读次数:
165
题目:给定两个大小为 m 和 n 的有序数组 nums1 和 nums2。 请你找出这两个有序数组的中位数,并且要求算法的时间复杂度为 O(log(m + n))。 你可以假设 nums1 和 nums2 不会同时为空。 示例 1: nums1 = [1, 3] nums2 = [2] 则中位数是 ...
分类:
编程语言 时间:
2018-12-16 14:44:02
阅读次数:
194
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 lists. Example: ...
分类:
编程语言 时间:
2018-12-15 11:52:52
阅读次数:
169
Given a linked list, swap every two adjacent nodes and return its head. Example: Note: Your algorithm should use only constant extra space. You may no ...
分类:
其他好文 时间:
2018-12-15 11:48:51
阅读次数:
117
You are given two non-empty linked lists representing two non-negative integers. The most significant digit comes first and each of their nodes contai ...
分类:
其他好文 时间:
2018-12-15 10:28:30
阅读次数:
167
A Paper Airplanes 周翔:@ B Battleship C Petya and Origami 周翔:@ D Margarite and the best present E Masha and two friends ...
分类:
其他好文 时间:
2018-12-14 22:47:59
阅读次数:
155
Product of Polynomials (25 分) This time, you are supposed to find A×B where A and B are two polynomials. Input Specification: Each input file contains ...
分类:
其他好文 时间:
2018-12-12 20:33:19
阅读次数:
265
On a staircase, the i-th step has some non-negative cost cost[i] assigned (0 indexed). Once you pay the cost, you can either climb one or two steps. Y ...
分类:
编程语言 时间:
2018-12-12 18:54:40
阅读次数:
204
Structural Directives https://angular.io/guide/structural-directives#template-input-variable There are two other kinds of Angular directives, describe ...
分类:
其他好文 时间:
2018-12-12 15:00:31
阅读次数:
173
import numpy as np from pandas import DataFrame import pandas as pd df=DataFrame(np.arange(12).reshape((3,4)),index=['one','two','thr'],columns=list('... ...
分类:
其他好文 时间:
2018-12-12 00:31:28
阅读次数:
836