码迷,mamicode.com
首页 > 2014年12月01日 > 全部分享
[leetcode]Reverse Nodes in k-Group
问题描述: Given a linked list, reverse the nodes of a linked list k at a time and return its modified list. If the number of nodes is not a multiple of k then left-out nodes in the end should remain ...
分类:其他好文   时间:2014-12-01 22:32:51    阅读次数:230
[LeetCode] Pascal's Triangle
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] ] 迭代 非递归版本 public class Solut...
分类:其他好文   时间:2014-12-01 22:35:09    阅读次数:204
网络模型各层设备
一、物理层 1.中继器 中继器是最简单的网络互联设备,连接同一个网络的两个或多个网段。完成物理信号的复 制、调整和放大功能,以此从而增加信号传输的距离。中继器只将任何电缆段上的数据发送到另一段电缆上,并不管数据中是否有错误数据或不适于网段的数据。 2.集线器 集线器也称HUB,属于共享型设备,接收数据广播发出,在局域网内一般都是 星型连接拓扑结构,每台工作站都连接到集线器上。由于集...
分类:其他好文   时间:2014-12-01 22:35:09    阅读次数:236
Find Minimum in Rotated Sorted Array
Find Minimum in Rotated Sorted Array...
分类:其他好文   时间:2014-12-01 22:34:20    阅读次数:235
javascript 微博发布框
发布后的内容高度缓慢变大,透明度从0到100 js代码: window.onload=function(){ var oTxt=document.getElementById('txts'); var oBtn=document.getElementById('btn'); var oUl=document.getElementById('ul1'); var oLi=oUl.get...
分类:编程语言   时间:2014-12-01 22:35:16    阅读次数:271
CD(01背包)
CD  You have a long drive by car ahead. You have a tape recorder, but unfortunately your best music is on CDs. You need to have it on tapes so the problem to solve is: you have a tape N m...
分类:其他好文   时间:2014-12-01 22:32:19    阅读次数:228
队花的烦恼一(nyoj275)
队花的烦恼一 时间限制:3000 ms  |  内存限制:65535 KB 难度:1 描述 ACM队的队花C小+经常抱怨:“C语言中的格式输出中有十六、十、八进制输出,然而却没有二进制输出,哎,真遗憾!谁能帮我写一个程序实现输入一个十进制数n,输出它的二进制数呀?” 难道你不想帮帮她吗?^_^ 输入输入有多个数据,数据以EOF结束;每个数据ni(0...
分类:其他好文   时间:2014-12-01 22:34:05    阅读次数:228
《Cocos2d-x实战 C++卷》上线了-源码-样章-感谢大家的支持
《Cocos2d-x实战 C++卷》上线了感谢大家一直以来的支持! 全面介绍Cocos开发技巧,采用Cocos2d-x3.2版本,并且详细介绍跨平台移植已经多平台发布细节。· 各大商店均开始销售:京东:http://item.jd.com/11584534.html亚马逊:http://www.amazon.cn/Cocos2d-x%E5%AE%9E%E6%88%98-C-%E5%8D%B7-%E...
分类:编程语言   时间:2014-12-01 22:33:43    阅读次数:411
[leetcode]Remove Duplicates from Sorted List II
问题描述: Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. For example, Given 1->2->3->3->4->4->5, return 1->2->5. Giv...
分类:其他好文   时间:2014-12-01 22:31:26    阅读次数:221
ruby利用Zip Gem写一个简单的压缩和解压的小工具
在UNIX下的我们怎么会沦落到用ruby写压缩和解压工具呢?直接上shell啊!但是请允许本猫这次可耻的用ruby来玩玩吧!其实ruby GEM中有很多压缩解压包,我选的是Zip,也许是因为名字符合KISS原则吧!     话先说到前头,这个工具如果解压有重名文件的情况会直接覆盖原文件而不会有任何提示!测试时务必注意,如果造成一些文件丢失可别怪本猫啊!     代码也考虑到多文件的情况,如果是...
分类:其他好文   时间:2014-12-01 22:33:43    阅读次数:343
UVA - 10340 - All in All (字符串处理!)
题目链接:All in All Problem E All in All Input: standard input Output: standard output Time Limit: 2 seconds Memory Limit: 32 MB You have devised a new encryption technique whi...
分类:其他好文   时间:2014-12-01 22:33:55    阅读次数:252
[leetcode] Rotate List
问题描述: Given a list, rotate the list to the right by k places, where k is non-negative. For example: Given 1->2->3->4->5->NULL and k = 2, return 4->5->1->2->3->NULL. 基本思想: 本题需要考虑k 大于链表长度的情况。所以链...
分类:其他好文   时间:2014-12-01 22:33:01    阅读次数:203
atitit.自己动手开发编译器and解释器(1) ------词法分析--attilax总结
atitit.自己动手开发编译器and解释器(1) ------词法分析--attilax总结       1.   应用场景:::DSL 大大提升开发效率 1 2. 2. 流程如下::: 词法分析(生成token流) >>>>语法分析(生成ast) >>解释执行... 2 3. 如何进行词法分析?Fsm状态机(自动机) 2 4. 使用状态模式构建FSM  (简单,易用。。推荐首选...
分类:其他好文   时间:2014-12-01 22:33:09    阅读次数:433
斐波那契查找算法完整C代码
/* 斐波那契查找法 */ #include #include int Fib( int k ) { if( 1 == k || 2 == k ) return 1; else return Fib(k-1)+Fib(k-2); } int FibSearch( int *a, int n, int key ) { int k = 1; int nFib; int *b...
分类:编程语言   时间:2014-12-01 22:33:54    阅读次数:259
[leetcode]Intersection of Two Linked Lists
问题描述: Write a program to find the node at which the intersection of two singly linked lists begins. For example, the following two linked lists: A: a1 → a2 ↘ ...
分类:其他好文   时间:2014-12-01 22:33:12    阅读次数:216
有个非计算机专业的问我:怎么学写游戏?
下面是我的回答: 1、游戏分为不同的平台类型:网页游戏、移动端的手机游戏、PC端游戏、专用主机游戏,作为个人开发者,基本上只有第二种能够赚钱,第一种需要服务器端的运营,后2种就不用考虑了 2、写游戏用什么软件工具?简单的说来,就两个:2D的用Cocos-2D,3D的用Unity 3D。且它们都有一个好处:可以直接跨平台部署到Android/iPhone上去(甚至网页端)。 3、但关键的问题是...
分类:其他好文   时间:2014-12-01 22:33:01    阅读次数:241
IP的计算------HDOJ杭电2206(写完脑洞大开,想象力要足够丰富)
Problem Description 在网络课程上,我学到了很多有关IP的知识。IP全称叫网际协议,有时我们又用IP来指代我们的IP网络地址,现在IPV4下用一个32位无符号整数来表示,一般用点分方式来显示,点将IP地址分成4个部分,每个部分为8位,表示成一个无符号整数(因此不需要用正号出现),如192.168.100.16,是我们非常熟悉的IP地址,一个IP地址串中没有空格出现(因为要表...
分类:其他好文   时间:2014-12-01 22:32:48    阅读次数:359
1655条   上一页 1 ... 6 7 8 9 10 11 12 ... 98 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!