51
Dev开发社区
首页
文章
问答
工具
搜索
登录
注册
#25分
1098 Insertion or Heap Sort (25分)
AccordingtoWikipedia:Insertionsort iterates,consumingoneinputelementeachrepetition,andgrowingasortedoutputlist.Eachiteration,insertionsortremovesoneelement...
代码星球
·
2020-08-09
1098
Insertion
or
Heap
Sort
1078 Hashing (25分)
Thetaskofthisproblemissimple:insertasequenceofdistinctpositiveintegersintoahashtable,andoutputthepositionsoftheinputnumbers.Thehashfunctionisdefinedtobe (&...
代码星球
·
2020-08-09
1078
Hashing
25分
1089 Insert or Merge (25分)
AccordingtoWikipedia:Insertionsort iterates,consumingoneinputelementeachrepetition,andgrowingasortedoutputlist.Eachiteration,insertionsortremovesoneelement...
代码星球
·
2020-08-09
1089
Insert
or
Merge
25分
1067 Sort with Swap(0, i) (25分)
Givenanypermutationofthenumbers{0,1,2,..., N−1},itiseasytosorttheminincreasingorder.Butwhatif Swap(0,*) istheONLYoperationthatisallowedtous...
代码星球
·
2020-08-09
1067
Sort
with
Swap
25分
1066 Root of AVL Tree (25分)(AVL树的实现)
AnAVLtreeisaself-balancingbinarysearchtree.InanAVLtree,theheightsofthetwochildsubtreesofanynodedifferbyatmostone;ifatanytimetheydifferbymorethanone,rebalancingi...
代码星球
·
2020-08-09
AVL
1066
Root
of
Tree
1063 Set Similarity (25分)
Giventwosetsofintegers,thesimilarityofthesetsisdefinedtobe /,where Nc isthenumberofdistinctcommonnumberssharedbythetwosets,and Nt ...
代码星球
·
2020-08-09
1063
Set
Similarity
25分
1062 Talent and Virtue (25分)(水)
About900yearsago,aChinesephilosopherSimaGuangwroteahistorybookinwhichhetalkedaboutpeople'stalentandvirtue.Accordingtohistheory,amanbeingoutstandinginbothtalenta...
代码星球
·
2020-08-09
1062
Talent
and
Virtue
25分
1060 Are They Equal (25分)
Ifamachinecansaveonly3significantdigits,thefloatnumbers12300and12358.9areconsideredequalsincetheyarebothsavedas 0 withsimplechopping.Nowgiventhenumber...
代码星球
·
2020-08-09
1060
Are
They
Equal
25分
1059 Prime Factors (25分)
Givenanypositiveinteger N,youaresupposedtofindallofitsprimefactors,andwritethemintheformat N = p1k1×p2k2×⋯&tim...
代码星球
·
2020-08-09
1059
Prime
Factors
25分
1055 The World's Richest (25分)(水排序)
Forbesmagazinepublisheseveryyearitslistofbillionairesbasedontheannualrankingoftheworld'swealthiestpeople.Nowyouaresupposedtosimulatethisjob,butconcentrateonlyon...
代码星球
·
2020-08-09
1055
The
World
#39s
Richest
1052 Linked List Sorting (25分)
Alinkedlistconsistsofaseriesofstructures,whicharenotnecessarilyadjacentinmemory.Weassumethateachstructurecontainsaninteger key anda Next poi...
代码星球
·
2020-08-09
1052
Linked
List
Sorting
25分
1051 Pop Sequence (25分)
Givenastackwhichcankeep M numbersatmost.Push N numbersintheorderof1,2,3,..., N andpoprandomly.Youaresupposedtotellifagivensequence...
代码星球
·
2020-08-09
1051
Pop
Sequence
25分
1048 Find Coins (25分)
Evalovestocollectcoinsfromallovertheuniverse,includingsomeotherplanetslikeMars.Onedayshevisitedauniversalshoppingmallwhichcouldacceptallkindsofcoinsaspayments.H...
代码星球
·
2020-08-09
1048
Find
Coins
25分
1047 Student List for Course (25分)
ZhejiangUniversityhas40,000studentsandprovides2,500courses.Nowgiventheregisteredcourselistofeachstudent,youaresupposedtooutputthestudentnamelistsofallthecourses...
代码星球
·
2020-08-09
1047
Student
List
for
Course
1044 Shopping in Mars (25分)(二分查找)
ShoppinginMarsisquiteadifferentexperience.TheMarspeoplepaybychaineddiamonds.Eachdiamondhasavalue(inMarsdollarsM$).Whenmakingthepayment,thechaincanbecutatanyposi...
代码星球
·
2020-08-09
1044
Shopping
in
Mars
25分
首页
上一页
1
2
下一页
尾页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他