码迷,mamicode.com
首页 >  
搜索关键字:python objects all    ( 160304个结果)
2014年百度之星程序设计大赛 - 资格赛 1004 Labyrinth(Dp)
Labyrinth Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 519    Accepted Submission(s): 174 Problem Description 度度熊是一只喜欢探险的熊,一次偶然落...
分类:其他好文   时间:2014-05-18 16:04:51    阅读次数:304
从Racket入门函数式编程
一直想学学LISP,今天总算开了个头。现在我学习LISP不是为了马上能够用于实际项目的应用,而是为了学习一下函数式的思维方式,能够更加深入的了解计算的本质,能够更好的用C++, Java, Python等编写程序。更何况,这些主流语言都逐渐增加了函数式编程的特征,C++,Java现在都引入了 Lambda 表达式。如果能够系统学习一下LISP,相信对自己以后掌握这些语言的新特新特征,对自己写JavaScript、Python,对自己了解闭包、高阶函数、Lambda表达式都会有很大帮助。言归正传,首先推荐三个...
分类:其他好文   时间:2014-05-18 16:01:45    阅读次数:530
LeetCode: Remove Element [026]
【题目】 Given an array and a value, remove all instances of that value in place and return the new length. The order of elements can be changed. It doesn't matter what you leave beyond the new length. 【题意】 删除数组中指定的值。不关心在新数组的后面即数组尾部留下了什么值。 【思路】 思路同Remo...
分类:其他好文   时间:2014-05-18 14:53:56    阅读次数:208
[LeetCode]4Sum
4Sum Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of target....
分类:其他好文   时间:2014-05-18 13:49:09    阅读次数:306
python基础教程_学习笔记5:字符串
字符串 基本字符串操作 字符串也是序列,因此序列的基本操作(索引、分片、连接、乘法、长度、求最大值和最小值、成员资格)对字符串同样适用: 索引 >>> 'a_string'[0] 'a' 长度 >>> len('a_string') 8 求最大值 >>> max('a_string') 't' 求最小值 >>> min('a_string') '_' 乘法 >>> ...
分类:编程语言   时间:2014-05-18 10:50:15    阅读次数:325
LeetCode: Generate Parentheses [021]
【题目】 Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. For example, given n = 3, a solution set is: "((()))", "(()())", "(())()", "()(())", "()()()" 【题意】 给定n对括号,输出所有可行的括号组合字符串。所谓合法,就是可以Valid Pare...
分类:其他好文   时间:2014-05-18 09:06:41    阅读次数:266
LeetCode: Merge k Sorted Lists [022]
【题目】 Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. 【题意】 合并K个有序链表 【思路】 归并 Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. For ...
分类:其他好文   时间:2014-05-18 09:05:40    阅读次数:255
python实现快速排序算法(两种不同实现方式)
python实现快速排序算法...
分类:编程语言   时间:2014-05-18 04:13:10    阅读次数:231
python中lambda的另类使用
Lambda挺强大,有兴趣的人看下关于lambda的理论,就清楚邱奇编码的实现了。 带if/else: ( lambda x, y: x if x 科里化: ( lambda x: ( lambda y: ( lambda z: x + y + z )( 1 ) )( 2 ) )( 3 ) 递归: func = lambda n: 1 if n == 0 e...
分类:编程语言   时间:2014-05-18 03:48:34    阅读次数:262
leetcode -day17 Path Sum I II & Flatten Binary Tree to Linked List & Minimum Depth of Binary Tree
1、 ?? Path Sum Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum. For example: Given the below...
分类:其他好文   时间:2014-05-18 03:25:06    阅读次数:301
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!