原创 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
原创 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 sl
原创 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
原创 Python2.7環境下安裝pydbg
最近在看《Python灰帽子:黑客與逆向工程師的Python編程之道》,其中第四章沒有詳細講解pydbg的安裝,使得我無法順利運行書中代碼。於是我專門花了些時間解決pydbg在Python2.7環境下的安
原创 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
原创 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 indivi
原创 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
原创 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 hin
原创 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 th
原创 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. A
原创 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 stac
原创 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
原创 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 t
原创 微軟下一代雲環境Web開發框架ASP.NET vNext預覽
微軟在2014年5月12日的TechEd大會上宣佈將會發佈下一代ASP.NET框架ASP.NET vNext的預覽。此次發佈的ASP.NET框架與以前相比發生了根本性的變化,凸顯了微軟“雲優先”(cloud-first)的新戰略思
原创 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. DEFIN