码迷,mamicode.com
首页 >  
搜索关键字:given n integers    ( 24278个结果
[leetcode]Read N Characters Given Read4
先用read4拷贝到buf4,然后从buf4里读: """ The read4 API is already defined for you. @param buf, a list of characters @return an integer def read4(buf): # Below is ...
分类:其他好文   时间:2020-02-07 16:35:00    阅读次数:78
7-20 Binary Search Tree (25分)
A binary search tree is uniquely determined by a given ordered insertions of a sequence of positive integers. On the other hand, a given binary search ...
分类:其他好文   时间:2020-02-07 10:53:55    阅读次数:85
560. Subarray Sum Equals K
Given an array of integers and an integer k, you need to find the total number of continuous subarrays whose sum equals to k. Example 1: Input:nums = ...
分类:其他好文   时间:2020-02-07 00:48:28    阅读次数:65
494. Target Sum
You are given a list of non-negative integers, a1, a2, ..., an, and a target, S. Now you have 2 symbols + and -. For each integer, you should choose o ...
分类:其他好文   时间:2020-02-06 23:22:15    阅读次数:72
leetcode922 Sort Array By Parity II
1 """ 2 Given an array A of non-negative integers, half of the integers in A are odd, and half of the integers are even. 3 Sort the array so that when ...
分类:其他好文   时间:2020-02-06 23:03:15    阅读次数:84
leetcode349 350 Intersection of Two Arrays & II
1 """ 2 Intersection of Two Arrays 3 Given two arrays, write a function to compute their intersection. 4 Example 1: 5 Input: nums1 = [1,2,2,1], nums2 ...
分类:其他好文   时间:2020-02-06 23:00:09    阅读次数:74
leetcode56 Merge Intervals
1 """ 2 Given a collection of intervals, merge all overlapping intervals. 3 Example 1: 4 Input: [[1,3],[2,6],[8,10],[15,18]] 5 Output: [[1,6],[8,10],[ ...
分类:其他好文   时间:2020-02-06 22:59:28    阅读次数:72
Leetcode 7. Reverse Integer
Given a 32-bit signed integer, reverse digits of an integer. Example 1: Input: 123Output: 321Example 2: Input: -123Output: -321Example 3: Input: 120Ou ...
分类:其他好文   时间:2020-02-06 19:49:49    阅读次数:65
leetcode17 Letter Combinations of a Phone Number
1 """ 2 Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. 3 A mapping of d ...
分类:其他好文   时间:2020-02-06 16:44:30    阅读次数:70
leetcode5 Longest Palindromic Substring
1 """ 2 Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. 3 Example 1: 4 Input: "bab ...
分类:其他好文   时间:2020-02-06 16:22:50    阅读次数:60
24278条   上一页 1 ... 75 76 77 78 79 ... 2428 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!