2015年1月19日

Two Sum III - Data structure design

摘要: Design and implement a TwoSum class. It should support the following operations:addandfind.add- Add the number to an internal data structure.find- Fin... 阅读全文

posted @ 2015-01-19 15:22 Step-BY-Step 阅读(551) 评论(0) 推荐(0) 编辑

Two Sum II - Input array is sorted

摘要: Given an array of integers that is alreadysorted in ascending order, find two numbers such that they add up to a specific target number.The function t... 阅读全文

posted @ 2015-01-19 14:51 Step-BY-Step 阅读(195) 评论(0) 推荐(0) 编辑

Read N Characters Given Read4

摘要: The API:int read4(char *buf)reads 4 characters at a time from a file.The return value is the actual number of characters read. For example, it returns... 阅读全文

posted @ 2015-01-19 14:40 Step-BY-Step 阅读(219) 评论(0) 推荐(0) 编辑

Binary Tree Upside Down

摘要: Given a binary tree where all the right nodes are either leaf nodes with a sibling (a left node that shares the same parent node) or empty, flip it up... 阅读全文

posted @ 2015-01-19 14:26 Step-BY-Step 阅读(212) 评论(0) 推荐(0) 编辑

Dungeon Game

摘要: The demons had captured the princess (P) and imprisoned her in the bottom-right corner of a dungeon. The dungeon consists of M x N rooms laid out in a... 阅读全文

posted @ 2015-01-19 13:04 Step-BY-Step 阅读(223) 评论(0) 推荐(0) 编辑

导航