码迷,mamicode.com
首页 >  
搜索关键字:intersection of two    ( 11974个结果
Depth-first Search(DFS)
There are generally two methods to write DFS algorithm, one is using recursion, another one is using stack. (reference from Wiki Pedia)Pseudocode for ...
分类:其他好文   时间:2014-06-13 08:39:34    阅读次数:218
[leetcode]Multiply Strings @ Python
原题地址:https://oj.leetcode.com/problems/multiply-strings/题意:Given two numbers represented as strings, return multiplication of the numbers as a string.N...
分类:编程语言   时间:2014-06-12 21:43:03    阅读次数:344
黑马程序员_学习IOS之字典常用的方法
字典是无序的 数组是有序的。字典分为:可变字典和不可变字典不可变字典对象NSDictionary * dict = [[NSDictionary alloc]initWithObjectsAndKeys:@"one",@"1",@"two",@"2",@"three",@"3",@"four",@"...
分类:移动开发   时间:2014-06-12 06:25:50    阅读次数:324
【002】}链表或字符串模拟加法/加一/乘法
链表模拟加法/字符串模拟二进制加法/数组模拟加一操作/打印1到最大的n位数/字符串模拟乘法============================================Add Two Numbers两个链表代表两个数字,每个结点的值都是一位数字,单链表逆序存放这两个数字,构造出一个新的链表...
分类:其他好文   时间:2014-06-10 22:02:23    阅读次数:409
[leetcode]Divide Two Integers @ Python
原题地址:https://oj.leetcode.com/problems/divide-two-integers/题意:Divide two integers without using multiplication, division and mod operator.解题思路:不许用乘、除和求...
分类:编程语言   时间:2014-06-10 21:43:00    阅读次数:267
【leetcode】Merge Sorted Array
Given two sorted integer arrays A and B, merge B into A as one sorted array.Note:You may assume that A has enough space (size that is greater or equal...
分类:其他好文   时间:2014-06-10 20:44:02    阅读次数:298
【leetcode】Gray Code
The gray code is a binary numeral system where two successive values differ in only one bit.Given a non-negative integernrepresenting the total number...
分类:其他好文   时间:2014-06-10 19:38:39    阅读次数:199
Merge Two Sorted Lists
题目 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. 方法 有序链表,合并成一个有序链表。 public ListNod...
分类:其他好文   时间:2014-06-10 18:13:11    阅读次数:241
Add Binary
题目 Given two binary strings, return their sum (also a binary string). For example, a = "11" b = "1" Return "100". 方法 从后往前,每个字符进行判断。 public String addBinary(String a, String...
分类:其他好文   时间:2014-06-10 17:50:48    阅读次数:241
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!