Given a stack which can keep M numbers at most. Push N numbers in the order of 1, 2, 3, ..., N and pop randomly. You are supposed to tell if a given s ...
分类:
其他好文 时间:
2021-05-24 13:43:08
阅读次数:
0
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, ...
分类:
其他好文 时间:
2021-05-24 13:17:05
阅读次数:
0
Given a sequence of K integers { N?1??, N?2??, ..., N?K?? }. A continuous subsequence is defined to be { N?i??, N?i+1??, ..., N?j?? } where 1≤i≤j≤K. T ...
分类:
其他好文 时间:
2021-05-24 12:48:45
阅读次数:
0
选词填空-填单词20题Directions: Complete each sentence using the words given below. Each word can be used only once. Change the form where necessary.fraught re ...
分类:
其他好文 时间:
2021-05-24 11:07:57
阅读次数:
0
原题链接 考察:树状数组+差分 上一道题的加强版,但还是结合差分数组 思路: 操作一:"C a b c"表示给[a, b]区间中的值全部增加c (-10000 ≤ c ≤ 10000)。 这里还是得用到差分,设b数组为原数组的差分数组,那么此操作就转化为单点修改 操作二:"Q a b" 询问[a, ...
分类:
其他好文 时间:
2021-05-24 10:15:07
阅读次数:
0
Super Palindromes (H) 题目 Let's say a positive integer is a super-palindrome if it is a palindrome, and it is also the square of a palindrome. Given tw ...
分类:
其他好文 时间:
2021-05-24 02:27:55
阅读次数:
0
题意:输入t个测试,每个测试输入n,k;判断n是否能使用k个不相同的奇数表示出来。 最开始想得太复杂,分了好多种情况,写了很多没用的代码。 题解:应该想什么样的数才能被表示出来: 奇偶对应(n为奇数,k也应该是奇数) n>=k*k(当不满足这个条件时,是找不到k个奇数的和等于n的) 有了这两个条件, ...
分类:
其他好文 时间:
2021-05-24 00:10:39
阅读次数:
0
There is a function signFunc(x) that returns: 1 if x is positive. -1 if x is negative. 0 if x is equal to 0. You are given an integer array nums. Let ...
分类:
其他好文 时间:
2021-05-23 23:06:06
阅读次数:
0
Course Schedule III (H) There are n different online courses numbered from 1 to n. You are given an array courses where courses[i] = [durationi, lastD ...
分类:
其他好文 时间:
2021-05-04 16:09:30
阅读次数:
0
You are given a 0-indexed string s that has lowercase English letters in its even indices and digits in its odd indices. There is a function shift(c, ...
分类:
其他好文 时间:
2021-05-04 15:31:41
阅读次数:
0