Problem : Given a 32 bit signed integer, reverse digits of an integer. Example 1: Example 2: Example 3: Note: Assume we are dealing with an environmen ...
分类:
其他好文 时间:
2020-03-27 19:48:05
阅读次数:
67
Problem : Given an array nums and a value val, remove all instances of that value in place and return the new length. Do not allocate extra space for ...
分类:
其他好文 时间:
2020-03-26 01:25:20
阅读次数:
65
914. 翻转游戏 中文English You are playing the following Flip Game with your friend: Given a string that contains only two characters: + and -, you can flip ...
分类:
其他好文 时间:
2020-03-26 01:06:15
阅读次数:
79
Problem : Given a sorted array nums, remove the duplicates in place such that each element appear only once and return the new length. Do not allocate ...
分类:
其他好文 时间:
2020-03-26 01:03:12
阅读次数:
78
A. Sum of Odd Integers 首先可以算出从1开始到第k个奇数之和。如果和大于n,则不可能存在k个奇数加和等于n,否则用n减去前k个奇数的和,这个差值若是偶数,直接加到最大的奇数上,就可以满足题意要求,否则输出no。 1 #include<bits/stdc++.h> 2 using ...
分类:
其他好文 时间:
2020-03-26 01:02:17
阅读次数:
72
[leetcode]1379. Find a Corresponding Node of a Binary Tree in a Clone of That Tree 链接 "leetcode" 描述 Given two binary trees original and cloned and giv ...
分类:
其他好文 时间:
2020-03-25 19:39:53
阅读次数:
70
Example input Copy 6 3 1 4 2 10 3 10 2 16 4 16 5 output Copy YES YES NO YES YES NO Note In the first test case, you can represent 3 as 3. In the secon ...
分类:
其他好文 时间:
2020-03-25 19:15:49
阅读次数:
92
Calculate A + B. InputEach line will contain two integers A and B. Process to end of file. OutputFor each case, output A + B in one line. Sample Input ...
分类:
其他好文 时间:
2020-03-25 16:09:38
阅读次数:
100
/** * Creates a new {@code ThreadPoolExecutor} with the given initial * parameters. * * @param corePoolSize the number of threads to keep in the pool, ...
分类:
编程语言 时间:
2020-03-24 18:48:09
阅读次数:
100
Write a function to generate the generalized abbreviations of a word. Example: Given word = “word”, return the following list (order does not matter): ...
分类:
编程语言 时间:
2020-03-24 10:52:44
阅读次数:
91