#25分

1043 Is It a Binary Search Tree (25分)(树的插入)

ABinarySearchTree(BST)isrecursivelydefinedasabinarytreewhichhasthefollowingproperties:Theleftsubtreeofanodecontainsonlynodeswithkeyslessthanthenode'skey.Therigh...
代码星球 ·2020-08-09

1040 Longest Symmetric String (25分)(dp)

Givenastring,youaresupposedtooutputthelengthofthelongestsymmetricsub-string.Forexample,given IsPAT&TAPsymmetric?,thelongestsymmetricsub-stringis s...

1039 Course List for Student (25分)

ZhejiangUniversityhas40000studentsandprovides2500courses.Nowgiventhestudentnamelistsofallthecourses,youaresupposedtooutputtheregisteredcourselistforeachstudentw...

1037 Magic Coupon (25分)

ThemagicshopinMarsisofferingsomemagiccoupons.Eachcouponhasaninteger N printedonit,meaningthatwhenyouusethiscouponwithaproduct,youmayget N ti...
代码星球 ·2020-08-09

1036 Boys vs Girls (25分)(水)

1036 BoysvsGirls (25分) Thistimeyouareaskedtotellthedifferencebetweenthelowestgradeofallthemalestudentsandthehighestgradeofallthefemalestudents.In...
代码星球 ·2020-08-09

1033 To Fill or Not to Fill (25分)(贪心)

Withhighwaysavailable,drivingacarfromHangzhoutoanyothercityiseasy.Butsincethetankcapacityofacarislimited,wehavetofindgasstationsonthewayfromtimetotime.Different...
代码星球 ·2020-08-09

1032 Sharing (25分)(数组链表)

TostoreEnglishwords,onemethodistouselinkedlistsandstoreawordletterbyletter.Tosavesomespace,wemayletthewordssharethesamesublistiftheysharethesamesuffix.Forexampl...

1029 Median (25分)

GivenanincreasingsequenceSofNintegers,themedianisthenumberatthemiddleposition.Forexample,themedianofS1={11,12,13,14}is12,andthemedianofS2={9,10,15,16,17}is15.Th...
代码星球 ·2020-08-09

KMP 串的模式匹配 (25分)

给定两个由英文字母组成的字符串String和Pattern,要求找到Pattern在String中第一次出现的位置,并将此位置后的String的子串输出。如果找不到,则输出“NotFound”。本题旨在测试各种不同的匹配算法在各种数据情况下的表现。各组测试数据特点如下:数据0:小规模字符串,测试...
代码星球 ·2020-04-09
首页上一页12下一页尾页