E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
CodingBat
JAVA实现makeBricks问题(
codingbat
)
Wewanttomakearowofbricksthatisgoalincheslong.Wehaveanumberofsmallbricks(1incheach)andbigbricks(5incheseach).Returntrueifitispossibletomakethegoalbychoosingfromthegivenbricks.Thisisalittleharderthanitl
修玛哦
·
2023-10-03 04:45
JAVA实现startWord(
codingbat
)
题目如下Givenastringandasecond"word"string,we'llsaythatthewordmatchesthestringifitappearsatthefrontofthestring,exceptitsfirstchardoesnotneedtomatchexactly.Onamatch,returnthefrontofthestring,orotherwiseret
修玛哦
·
2023-08-25 13:04
Python基础:有哪些网站可以做新手练习题?
https://
codingbat
.com/python免费的在
Python自动化办公社区
·
2022-09-15 00:26
Python知识点(超详细)
python
游戏
CodingBat
Java
//////////2016-10-22----------2016-10-29///////////////////////intmisson(){http://
codingbat
.com/java}
javaMonkey
·
2022-02-12 11:08
CodingBat
| make_bricks
链接:Makebricks问题思路:先尽可能多地使用大的,再使用小的1)用了多少块大的:min(big,goal/5)2)还需要多少块小的:goal-5*min(big,goal/5)defmake_bricks(small,big,goal):ifgoal/5<=big:returngoal%5<=smallelse:returngoal-big*5<=small更简洁的写法:defmake_b
cunane
·
2020-09-11 01:41
CodingBat
python入门知识总结
http://
codingbat
.com/暑假没回家,一不小心培训了python,反正免费的不听白不听,总比呆在寝室无聊好的多,庆幸的是坚持下来了,现在回想起来虽然学习时间很短,但确实感触蛮大的,因此写这篇文章总结一下
Hungryof
·
2020-08-25 09:41
Python
codingbat
:recursion-2:1(JAVA)
publicbooleangroupSum(intstart,int[]nums,inttarget){if(start>=nums.length&&target!=0)returnfalse;if(target==0)returntrue;elsereturngroupSum(start+1,nums,target-nums[start])||groupSum(start+1,nums,ta
zafzap1
·
2020-08-20 02:25
扯蛋
codingbat
:recursion1:2(JAVA)
publicintcountX(Stringstr){if(str.length()<=1){if(str.equals("x"))return1;elsereturn0;}elsereturncountX(str.substring(0,1))+countX(str.substring(1,str.length()));}publicintcountHi(Stringstr){if(str.
zafzap1
·
2020-08-20 02:25
扯蛋
【
CodingBat
】练习1——Warmup_1--sleep_in--
题目:TheparameterweekdayisTrueifitisaweekday,andtheparametervacationisTrueifweareonvacation.Wesleepinifitisnotaweekdayorwe'reonvacation.ReturnTrueifwesleepin.要求的输出:sleep_in(False,False)→Truesleep_in(Tru
maxleochenke
·
2020-08-20 00:02
python学习
【
CodingBat
】tenRun问题的两种解法
问题描述:tenRun问题Foreachmultipleof10inthegivenarray,changeallthevaluesfollowingittobethatmultipleof10,untilencounteringanothermultipleof10.So{2,10,3,4,20,5}yields{2,10,10,10,20,20}.examples:tenRun([2,10,3
cunane
·
2020-08-20 00:28
【
CodingBat
】 canBalance问题
问题描述:canBalance问题Givenanon-emptyarray,returntrueifthereisaplacetosplitthearraysothatthesumofthenumbersononesideisequaltothesumofthenumbersontheotherside.canBalance([1,1,1,2,1])→truecanBalance([2,1,1,2
cunane
·
2020-08-20 00:28
【
CodingBat
】 squareUp问题
问题描述:squareUp问题Givenn>=0,createanarraylengthn*nwiththefollowingpattern,shownhereforn=3:{0,0,1,0,2,1,3,2,1}(spacesaddedtoshowthe3groups).squareUp(3)→[0,0,1,0,2,1,3,2,1]squareUp(2)→[0,1,2,1]squareUp(4)→
cunane
·
2020-08-20 00:28
CodingBat
【
CodingBat
】evenOdd问题
问题描述:evenOdd问题Returnanarraythatcontainstheexactsamenumbersasthegivenarray,butrearrangedsothatalltheevennumberscomebeforealltheoddnumbers.Otherthanthat,thenumberscanbeinanyorder.Youmaymodifyandreturnth
cunane
·
2020-08-20 00:28
【
CodingBat
】 linearIn问题 ★★★
问题描述:linearIn问题★★★Giventwoarraysofintssortedinincreasingorder,outerandinner,returntrueifallofthenumbersininnerappearinouter.Thebestsolutionmakesonlyasingle"linear"passofbotharrays,takingadvantageofthe
cunane
·
2020-08-20 00:28
codingbat
:recursion-1:3
publicStringpairStar(Stringstr){if(str.length()<2)returnstr;if(str.charAt(0)==str.charAt(1))returnstr.substring(0,1)+"*"+pairStar(str.substring(1,str.length()));elsereturnstr.substring(0,1)+pairStar
zafzap1
·
2020-08-19 23:50
扯蛋
JAVA实现starOut(
codingbat
)
题目如下Returnaversionofthegivenstring,whereforeverystar(*)inthestringthestarandthecharsimmediatelytoitsleftandrightaregone.So"ab*cd"yields"ad"and"ab**cd"alsoyields"ad".starOut("ab*cd")→"ad"starOut("ab**c
修玛哦
·
2020-05-21 17:34
聪聪工作室---JAVA入门小程序---
CodingBat
练习总结 1
CodingBat
练习总结1聪聪工作室-主页publicstaticMapwordCount(String[]strings){HashMapmap=newHashMap();for(Strings:strings
繁花流水congcong
·
2020-04-05 08:17
String
今天自己做小题目,网址http://
codingbat
.com/java,主要用到字符串中的方法。
尉昌达
·
2020-02-19 06:36
程序员刷题面试资源汇总
刷题网站: -NowCoder-InterviewCake -LeetCode -HackerRank -CodeEval -TopCoder -
CodingBat
-GeeksforGeeks -ProgrammingPraxis
cunane
·
2019-01-10 00:00
机器学习相关编程练习题(从0到1)
练习题编程语言入门经典100例【Python版】https://www.cnblogs.com/CheeseZH/archive/2012/11/05/2755107.htmlcodingbathttps://
codingbat
.com
hello_hxx
·
2018-11-01 11:43
机器学习
Array to String (java)
int[]nums={2,3,4};//通过Arrays.toString(nums)转换成string后,存储格式为[2,3,4]Stringnum=Arrays.toString(nums);下面看看
codingBat
奇得隆东枪
·
2016-08-29 06:23
Python学习资源
http://
codingbat
.com/python 注:该网站也有Java练习。 填空让assert成立的练习 比较简单,也是一种比较好的练习方式。还可以感受下TDD
·
2015-10-30 13:25
python
python入门知识总结
http://
codingbat
.com/暑假没回家 ,一不小心培训了python,反正免费的不听白不听,总比呆在寝室无聊好的多,庆幸的是坚持下来了,现在回想起来虽然学习时间很短,但确实感触蛮大的,因此写这篇文章总结一下
Hungryof
·
2014-09-15 17:00
编程
python
脚本语言
上一页
1
下一页
按字母分类:
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
其他