毅想天开

导航

2017年3月13日 #

dict的几个要点

摘要: 1. 采用key,value键-值对进行存储 2. key必须是不可变对象 3. key值不能重复 添加元素: aDict = {'1':'aaa','b':'bbb','3':'ccc'} aDict['d'] = 'ddd' print aDict ==> {'1': 'aaa', '3': ' 阅读全文

posted @ 2017-03-13 22:45 CodeForJoy 阅读(169) 评论(0) 推荐(0) 编辑

2017年3月3日 #

Leet Code 3. Longest Substring Without Repeating Characters

摘要: Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcbb", the answer is "abc", which the leng 阅读全文

posted @ 2017-03-03 17:02 CodeForJoy 阅读(121) 评论(0) 推荐(0) 编辑

2017年2月26日 #

成都某游戏开发的三道编程题

摘要: 1. 打印杨辉三角; 2. 实现两个大数据之间的相加(数据位数可能很大比方100位) 3.有100,0000个0~100的随机数,算出每个数字出现的次数。 阅读全文

posted @ 2017-02-26 21:59 CodeForJoy 阅读(226) 评论(0) 推荐(0) 编辑