2013年10月3日

Rotate List

摘要: Given a list, rotate the list to the right bykplaces, wherekis non-negative.For example:Given1->2->3->4->5->NULLandk=2,return4->5->1->2->3->NULL.最开始想直接用双指针做就行了。 但是发现n竟然可以比length长。 1 /** 2 * Definition for singly-linked list. 3 * public class ListNode { 4 * int val; 5 * 阅读全文

posted @ 2013-10-03 15:14 Step-BY-Step 阅读(229) 评论(0) 推荐(0) 编辑

G家二面

摘要: 题目都很基本,都属于听说过但是不会做的…都是操作系统,compiler的概念题…概念题郁闷就郁闷在不会就是不会,就算能扯两句也会被问倒…算法就一个,pow(x, y),5分钟不到……不是听说G家都问算法吗……T_T看来以后还是得把CS的基本课过一遍…作为EE的人表示亚历山大啊 阅读全文

posted @ 2013-10-03 13:09 Step-BY-Step 阅读(167) 评论(0) 推荐(0) 编辑

Candy

摘要: There areNchildren standing in a line. Each child is assigned a rating value.You are giving candies to these children subjected to the following requirements:Each child must have at least one candy.Children with a higher rating get more candies than their neighbors.What is the minimum candies you mu 阅读全文

posted @ 2013-10-03 08:55 Step-BY-Step 阅读(234) 评论(0) 推荐(0) 编辑

Unique Paths II

摘要: A robot is located at the top-left corner of amxngrid (marked 'Start' in the diagram below).The robot can only move either down or right at any point ... 阅读全文

posted @ 2013-10-03 03:42 Step-BY-Step 阅读(152) 评论(0) 推荐(0) 编辑

Minimum Path Sum

摘要: Given amxngrid filled with non-negative numbers, find a path from top left to bottom right whichminimizesthe sum of all numbers along its path.Note:Yo... 阅读全文

posted @ 2013-10-03 03:16 Step-BY-Step 阅读(199) 评论(0) 推荐(0) 编辑

导航