4Sum (M) 题目 Given an array nums of n integers and an integer target, are there elements a, b, c, and d in nums such that a + b+ c + d = target? Find a ...
分类:
其他好文 时间:
2020-06-21 09:18:37
阅读次数:
40
Given a string S, consider all duplicated substrings: (contiguous) substrings of S that occur 2 or more times. (The occurrences may overlap.) Return a ...
分类:
其他好文 时间:
2020-06-20 13:20:54
阅读次数:
43
Different Ways to Add Parentheses (M) 题目 Given a string of numbers and operators, return all possible results from computing all the different possibl ...
分类:
其他好文 时间:
2020-06-19 12:31:00
阅读次数:
43
建了两个模块: 第一个Fighter.py: class Fighter(object): """战斗者""" __slots__ = ('_name', '_hp') def __init__(self, name, hp): """初始化方法""" self._name = name self. ...
分类:
编程语言 时间:
2020-06-18 21:08:44
阅读次数:
211
Given the array candies and the integer extraCandies, where candies[i] represents the number of candies that the ith kid has. For each kid check if th ...
分类:
其他好文 时间:
2020-06-18 13:17:39
阅读次数:
65
Given an array of integers arr and an integer k. Find the least number of unique integers after removing exactly k elements. Example 1: Input: arr = [ ...
分类:
其他好文 时间:
2020-06-18 13:10:04
阅读次数:
64
Given a constant K and a singly linked list L, you are supposed to reverse the links of every K elements on L. For example, given L being 1→2→3→4→5→6, ...
分类:
其他好文 时间:
2020-06-17 23:12:36
阅读次数:
57
static void ComputeCodeLines() { string dir = @"D:\Work"; int totalLines = 0; string[] allFiles = Directory.GetFiles(dir, "*.cs", SearchOption.AllDire ...
1078 Hashing (25分) The task of this problem is simple: insert a sequence of distinct positive integers into a hash table, and output the positions of ...
分类:
其他好文 时间:
2020-06-17 12:38:08
阅读次数:
61
题目: Given a positive integer n, write a program to find out a nonzero multiple m of n whose decimal representation contains only the digits 0 and 1. Y ...
分类:
其他好文 时间:
2020-06-16 12:50:35
阅读次数:
58