- 博客(36)
- 资源 (11)
- 收藏
- 关注
翻译 微软下一代云环境Web开发框架ASP.NET vNext预览
微软在2014年5月12日的TechEd大会上宣布将会发布下一代ASP.NET框架ASP.NET vNext的预览。此次发布的ASP.NET框架与以前相比发生了根本性的变化,凸显了微软“云优先”(cloud-first)的新战略思想。
2014-05-13 15:20:18
2422
原创 Chapter 4 Trees and Graphs - 4.5
Problem 4.5: Write an algorithm to find the 'next' node (i.e., in-order successor) of a given node in a binary search tree where each node has a link to its parent.To address this problem, the mos
2012-07-22 11:40:48
903
原创 Chapter 4 Trees and Graphs - 4.4
Problem 4.4: Given a binary search tree, design an algorithm which creates a linked list of all the nodes each depth (i.e., if you have a tree with depthD, you'll have D linked lists).BFS, again..
2012-07-22 11:38:46
991
原创 Chapter 4 Trees and Graphs - 4.3
Problem 4.3 Given a sorted (increasing) array, write an algorithm to create a binary tree with minimal height.Seems that we should construct a complete binary tree.from queue import *class bina
2012-07-22 11:37:10
840
原创 Chapter 4 Trees and Graphs - 4.2
Problem 4.2 Given a directed graph, design an algorithm to find out whether there is a route between two nodes.Classic homework in the course of graph theory. Either BFS or DFS can solve it.from
2012-07-22 11:34:19
816
原创 Chapter 4 Trees and Graphs - 4.1
Problem 4.1: Implement a function to check if a tree is balanced. For the purposes of this question, a balanced tree is defined to be a tree such that no two leaf nodes differ in distance from the roo
2012-07-22 11:32:36
807
原创 Chapter 3 Stacks and Queues - 3.6
Problem 3.6: Write a program to sort a stack in ascending order. You should not make any assumptions about how the stack is implemented. The following are the only functions that should be used to wri
2012-07-02 22:24:58
813
原创 Chapter 3 Stacks and Queues - 3.5
Problem 3.5: Implement a MyQueue class which implements a queue using two stacks.The word "two stacks" is a strong hint. I implemented my solution quickly.from stack import *class MyQueue:
2012-07-02 22:23:30
841
原创 Chapter 3 Stacks and Queues - 3.4
Problem 3.4: In the classic problem of the Towers of Hanoi, you have 3 rods and N disks fo different sizes which can slide onto any tower. The puzzle starts with disks sorted in ascending order of siz
2012-07-02 22:21:42
832
原创 Chapter 3 Stacks and Queues - 3.3
Problem 3.3: Imagine a (literal) stack of plates. If the stack gets too high, it might topple. Therefore, in real life, we would likely start a new stack when the previous stack exceeds some threshold
2012-07-02 22:20:22
1147
原创 Chapter 3 Stacks and Queues - 3.2
problem 3.2: How would you design a stack which, in addition to push and pop, also has a function min which returns the minimum element? Push, pop and min should all operate in O(1) time.At first,
2012-07-02 22:18:59
857
原创 Chapter 3 Stacks and Queues - 3.1
Problem 3.1: Describe how you could use a single array to implement three stacks.Splitting the array into three individual parts is quite intuitive.How can we take full advantage of the unused
2012-06-30 12:41:53
992
原创 Chapter 2 Linked Lists - 2.5
Problem 2.5: Given a circular linked list, implment an algorithm which returns node at the beginning of the loop.DEFINITIONCircular linked list: A (corrupt) linked list in which a node's next poin
2012-06-30 12:38:47
983
原创 Chapter 2 Linked Lists - 2.4
Problem 2.4: You have two numbers represented by a linked list, where each node contains a single digit. The digit are stored in reverse order, such that the 1's digit is at the head of the list. Writ
2012-06-11 22:56:41
822
原创 Chapter 2 Linked Lists - 2.3
Problem 2.3: Implement an algorithm to delete a node in the middle of a single linked list, given only access to that node.EXAMPLEInput: the node 'c' from the linked list a->b->c->d->eResult: no
2012-06-11 22:54:24
872
原创 Chapter 2 Linked Lists - 2.2
Problem 2.2: Implement an algorithm to find the nth to last element of a singly linked list.The solution on answer page needs only one iteration while other intuitive solution takes more than one
2012-06-11 22:52:13
754
原创 Chapter 2 Linked Lists - 2.1
2.1 Write code to remove duplicates from an unsorted linked list.FOLLOW UPHow would you solve this problem if a temporary buffer is not allowed?First of all, we should ask the interviewer whic
2012-06-11 22:48:08
1116
原创 Python2.7环境下安装pydbg
最近在看《Python灰帽子:黑客与逆向工程师的Python编程之道》,其中第四章没有详细讲解pydbg的安装,使得我无法顺利运行书中代码。于是我专门花了些时间解决pydbg在Python2.7环境下的安装问题,并贴在这里希望能帮助到其他人。(本文由Wei Wang原创, 欢迎访问我的博客:http://blog.csdn.net/cheng_tian)1. 下载pydbg:请到 http
2012-06-11 13:02:47
5002
原创 Chapter 1 Arrays and Strings - 1.8
Problem 1.8: Assume you have a method isSubString which checks if one word is a substring of another. Given two strings, s1 and s2, write code to check if s2 is a rotation of s1 using only one call to
2012-06-08 15:45:38
714
原创 Chapter 1 Arrays and Strings - 1.7
Problem 1.7: Write an algorithm such that if an element in an MxN matrix is 0, its entire row and column is set to 0.At the first glance, we can just iterate the matrix and when we find a zero, we
2012-06-06 16:17:43
697
原创 Chapter 1 Arrays and Strings - 1.6
Problem 1.6: Given an image represented by an NxN matrix, where each pixel in the image is 4 bytes, write a method to rotate the image by 90 degrees. Can you do this in place?The question is not c
2012-06-06 15:11:07
593
原创 Chapter 1 Arrays and Strings - 1.5
Problem 1.5: Write a method to replace all spaces in a string with '%20'.The first solution flashed into my mind takes O(n), and it's similar to the one on the answer page.import stringdef repl
2012-06-06 15:05:39
566
原创 Chapter 1 Arrays and Strings - 1.4
1.4 Write a method to decide if two strings are anagrams or not.This "easy" problem really taught me a lesson. Firstly, I quickly came up with a somewhat smart solution:import stringdef are_a
2012-06-04 11:51:59
580
原创 Chapter 1 Arrays and Strings - 1.3
The statement of problem 1.3 is:Design an algorithm and write code to remove the duplicate characters in a string without using any additional buffer. NOTE: One or two additional variables are fine.
2012-06-04 00:52:33
858
原创 Chapter 1 Arrays and Strings - 1.2
Problem:1.2 Write code to reverse a C-Style String. (C-String means that "abcd" is represented as five characters, including the null character.)This one is quite easy:# -*- coding:utf-8 -
2012-06-01 18:40:18
662
原创 Chapter 1 Arrays and Strings - 1.1
This the first problem in the "Cracking the Coding Interview" book. The statement of problem is presented below:1.1 Implement an algorithm to determine if a string has all unique characters. What
2012-06-01 17:08:51
1006
1
原创 Prologue
"Cracking the Coding Interview" is an amazing book. Students who found good jobs speak highly of it.To find a good job after I graduate from the MS program in 2013, I should go through thi
2012-06-01 17:01:53
706
原创 使用Cmake搭建Qt+VTK工程(顺便推荐超好Cmake入门教程一本)
组内的项目要从MFC+OpenGL向Qt+VTK迁移。最近的任务是先把一个小模块进行尝试性迁移。配置环境过程中发现Qt+VTK的项目配置起来十分麻烦,于是google之,发现使用CMake这个工具可以大大简化我们的配置过程。可惜我从没接触过Cmake,于是再次google之,发现搜索到的相关教程都很是简陋,不系统也不实用。后来在机缘巧合之下找到了一份《Cmake 实践》(http://
2012-02-19 05:58:25
5544
2
原创 易忘知识点——C++类的static数据成员
就要去实习了,迅速过第二遍《C++ Primer》,看到遗忘了的知识点就记在这了。 1.类的static数据成员的初始化不同于普通成员:static成员不是通过构造函数初始化的,而是在定义时进行初始化。即,除了在声明类时声明一次static数据成员,还需要在第一次使用前定
2011-08-19 19:07:14
1118
1
原创 关于学习基础学科与培养编程能力的问答
有学姐即将去往UCSD读CS的master,她本科是学EE的,正在提前补充知识。今天她向我请教了一些问题,我将我的回答贴在这,希望对其他人也有用。 问:打扰又要请教下,你觉得编程能力的培养是需要按部就班系统学习操作系统、数据结构、算法这些之后才能进行,还是可以像本科我
2011-08-17 14:05:49
1376
原创 phplist发送带附件邮件的设置
<br /> phplist的最新版本中添加了发送附件的功能(我使用的是2.10.12),但在默认情况下此功能是关闭的。我们需要打开此功能,同时进行一些配置。步骤如下(windows环境下):<br /> <br /> 1.打开lists/config/config.php,搜索<br /> define("ALLOW_ATTACHMENTS",0);<br /> 修改为:<br /> define("ALLOW_ATTACHMENTS",1);<br /> <
2010-09-17 00:13:00
2122
原创 phplist(及phpmailer)通过gmail发送邮件的配置方法
<br /> 一般来说,只要你使用的不是gmail邮箱,那么利用phplist发送邮件只要按照《邮件群发系统phplist的配置方法总结》配置就够了。但若你如同我一样不幸,必须使用gmail这种有ssl验证的邮箱,那么恭喜你,我的不幸现在已然成为你的幸运,经过数天的尝试,我终于成功将gmail与phplist组合在了一起。现将经验分享于此,希望对各位同我一般境遇的同志有用。另外,phplist的核心是phpmailer,我提出的解决方案也主要是围绕phpmailer的,所以需要使用phpmailer通
2010-08-26 11:02:00
11401
14
原创 Objective-C中const常量是外连接的
<br /><br /> 前几天老师要求实现一个iphone上的“吃豆人”小游戏,给一下午加一晚上的时间。由于粟的设计很合理,且没有考虑太多、太复杂的情况(如 pacman 吃了 magic dot 后所有ghost的速度应该变慢),总体上没遇到什么太大的困难——只是在开发过程中曾遇到一个很诡异的错误:<br /> 为了遵循DRY原则,我把公用常量(ghost的数量)定义放在了一个define.h文件中,让大家都去import该文件。<br /> 当时我的常量定义是这样写的:<br />
2010-07-26 17:39:00
6527
4
与Python2.7对应的pydasm.pyd
2012-06-11
C#程序开发范例宝典书后源码
2010-05-15
现代编译程序设计.pdf 中文版
2010-05-14
PHP编程起步自学教程
2010-05-14
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人