09 2014 档案

摘要:Given a linked list, remove thenthnode from the end of list and return its head.For example, Given linked list: 1->2->3->4->5, and n = 2. After re... 阅读全文
posted @ 2014-09-11 20:49 dijkstra-c 阅读(187) 评论(0) 推荐(0)
摘要:Determine whether an integer is a palindrome. Do this without extra space.click to show spoilers.Some hints:Could negative integers be palindromes? (i... 阅读全文
posted @ 2014-09-11 20:00 dijkstra-c 阅读(123) 评论(0) 推荐(0)
摘要:Write an efficient algorithm that searches for a value in anmxnmatrix. This matrix has the following properties:Integers in each row are sorted from l... 阅读全文
posted @ 2014-09-05 11:19 dijkstra-c 阅读(186) 评论(0) 推荐(0)
摘要:Given a collection of numbers, return all possible permutations.For example,[1,2,3]have the following permutations:[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,... 阅读全文
posted @ 2014-09-05 10:36 dijkstra-c 阅读(181) 评论(0) 推荐(0)
摘要:Given a string containing just the characters'(',')','{','}','['and']', determine if the input string is valid.The brackets must close in the correct ... 阅读全文
posted @ 2014-09-03 21:11 dijkstra-c 阅读(159) 评论(0) 推荐(0)
摘要:Given a stringsconsists of upper/lower-case alphabets and empty space characters' ', return the length of last word in the string.If the last word doe... 阅读全文
posted @ 2014-09-02 19:30 dijkstra-c 阅读(114) 评论(0) 推荐(0)
摘要:Given a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root node down to the nearest le... 阅读全文
posted @ 2014-09-02 19:27 dijkstra-c 阅读(107) 评论(0) 推荐(0)
摘要: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 @ 2014-09-02 16:45 dijkstra-c 阅读(300) 评论(0) 推荐(0)
摘要:You are given annxn2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Follow up:Could you do this in-placen*n矩阵顺时针旋转90度,规律 a[i... 阅读全文
posted @ 2014-09-02 15:30 dijkstra-c 阅读(122) 评论(0) 推荐(0)