码迷,mamicode.com
首页 >  
搜索关键字:java算法    ( 446个结果
简单的关于身份证(15位或者18位)合法性验证
简单的关于身份证(15位或者18位)合法性验证...
分类:其他好文   时间:2015-01-09 17:28:04    阅读次数:274
leetCode做题笔记二(4, 8)
LeetCode8,手写atoi,一大堆判断。。。最好记录408ms,约为5%。经验4:如何经济的判断溢出经验5:让不合法的输入第一时间return0;经验6:对于javascript里那一堆isxxx的函数,对应在Java的Character类下2.LeetCode4求两个升序数组的中位数网上大部分解法都是错误的,和我犯了一..
分类:其他好文   时间:2015-01-03 13:26:05    阅读次数:252
Compare Version Numbers
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/42342251 Compare two version numbers version1 and version1. If version1 > version2 return 1, if version1 < version2 return -1, otherwise return 0. You may assume that the version stri...
分类:其他好文   时间:2015-01-02 17:33:55    阅读次数:275
疯狂的Java算法——插入排序,归并排序以及并行归并排序
从古至今的难题 在IT届有一道百算不厌其烦的题,俗称排序。不管是你参加BAT等高端笔试,亦或是藏匿于街头小巷的草根笔试,都会经常见到这样一道百年难得一解的问题。 今天LZ有幸与各位分享一下算法届的草根明星,排序届的领衔大神——插入排序以及归并排序。最后,在头脑风暴下,LZ又有幸认识了一位新朋...
分类:编程语言   时间:2014-12-22 07:04:05    阅读次数:311
LeetCode 刷题之二:寻找二叉树的最大深度
题目为: Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node. 阶梯思路:对于这种题目最简单的方法就是递归操作了...
分类:其他好文   时间:2014-12-12 23:40:13    阅读次数:374
LeetCode刷题之一:寻找只出现一次的数字
题目为: Given an array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runtime complexity. Could you implement it without...
分类:其他好文   时间:2014-12-12 23:39:44    阅读次数:473
LeetCode刷题之三:判断两个二叉树是否相同
题目为: Given two binary trees, write a function to check if they are equal or not. Two binary trees are considered equal if they are structurally identical and the nodes have the same value. 解题...
分类:其他好文   时间:2014-12-12 23:37:16    阅读次数:308
Pascal's Triangle
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/41827325 Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5, Return [ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,6,4,1] ]...
分类:其他好文   时间:2014-12-09 21:39:15    阅读次数:216
在一个数组中找到连续的子数组最大的乘积
在一个数组中找到连续的子数组最大的乘积...
分类:编程语言   时间:2014-12-08 21:28:45    阅读次数:178
Merge Two Sorted Lists
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/41750865 Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. For example, Given 1->2->3,4->5->6,...
分类:其他好文   时间:2014-12-06 08:55:36    阅读次数:245
446条   上一页 1 ... 35 36 37 38 39 ... 45 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!