码迷,mamicode.com
首页 >  
搜索关键字:up    ( 7825个结果)
Linked List Cycle
Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?思路:1.两个指针,一个走1步,一个走2步,如果相遇则有环注意: 在使用p->nex...
分类:其他好文   时间:2015-03-15 19:38:56    阅读次数:126
Binary Tree Level Order Traversal
Binary Tree Level Order Traversal问题: Given a binary tree, return thebottom-up level ordertraversal of its nodes' values. (ie, from left to right, lev....
分类:其他好文   时间:2015-03-15 16:29:32    阅读次数:119
hdu 1175 dfs
背景:数次超时,数次wa,dfs还是存在代码不规范的情况,什么时候回溯没有考虑清楚。后来看了模板化的搜索写法,发现我一直没有用过visit[M][M]标记访问过的点,而是直接在原图上标记,这样是节约内存但是,容易出错! 思路:这个转向题最大的特点是,创建了一个结构体,即有转向数count,也有上次走来的方向up,一旦up和这次的方向数不一样,count就加一(我的代码少考虑了,起点和终点在同一点...
分类:其他好文   时间:2015-03-15 12:32:07    阅读次数:155
A*搜索算法的JAVA实现 解棋盘爵士游历问题 BFS
A knight moves on a chessboard two squares up, down, left, or right followed by one square in one of the two directions perpendicular to the first part of the move (i.e., the move is L-shaped). Suppos...
分类:编程语言   时间:2015-03-15 12:27:03    阅读次数:181
POJ 3087 Shuffle'm Up 线性同余,暴力 难度:2
http://poj.org/problem?id=3087设:s1={A1,A2,A3,...Ac}s2={Ac+1,Ac+2,Ac+3,....A2c}则合在一起成为Ac+1,A1,Ac+2,A2......A2c,Ac经过一次转换之后变成s1={Ac+1,A1,Ac+2.....}s2={.....
分类:其他好文   时间:2015-03-14 21:39:59    阅读次数:115
Android SDK最小需求
As a minimum when setting up the Android SDK, you should download the latest tools and Android platform:Open the Tools directory and select:Android SD...
分类:移动开发   时间:2015-03-14 18:11:57    阅读次数:227
Two Sum
Two Sum  Total Accepted: 70583 Total Submissions: 390661 Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should retur...
分类:其他好文   时间:2015-03-13 18:48:27    阅读次数:167
网络信息安全攻防学习平台(基础关write up)
题目地址:http://hackinglab.cn/index_2.php --------------------------------------------------------------------------------- 1、key在哪里?(http://lab1.xseclab.com/base1_4a4d993ed7bd7d467b27af52d2aaa800/ind...
分类:其他好文   时间:2015-03-13 18:42:57    阅读次数:8420
Two Sum
Two Sum问题:Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of ...
分类:其他好文   时间:2015-03-13 16:13:11    阅读次数:169
Codeforces 514 D R2D2 and Droid Army(RMQ+二分)
An army of n droids is lined up in one row. Each droid is described by m integers a1,?a2,?...,?am, where ai is the number of details of thei-th type in this droid's mechanism. R2-D2 wants to destr...
分类:其他好文   时间:2015-03-13 14:24:35    阅读次数:152
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!