上一页 1 ··· 45 46 47 48 49 50 51 52 53 ··· 98 下一页
摘要: Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in or... 阅读全文
posted @ 2014-11-21 08:36 Jessica程序猿 阅读(177) 评论(0) 推荐(0) 编辑
摘要: Dynamic ProgrammingFind the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the arra... 阅读全文
posted @ 2014-11-21 08:23 Jessica程序猿 阅读(160) 评论(0) 推荐(0) 编辑
摘要: Given an integern, generate a square matrix filled with elements from 1 ton2in spiral order.For example,Givenn=3,You should return the following matri... 阅读全文
posted @ 2014-11-20 21:59 Jessica程序猿 阅读(180) 评论(0) 推荐(0) 编辑
摘要: Given a matrix ofmxnelements (mrows,ncolumns), return all elements of the matrix in spiral order.For example,Given the following matrix:[ [ 1, 2, 3 ],... 阅读全文
posted @ 2014-11-20 21:29 Jessica程序猿 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 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.注意:当给... 阅读全文
posted @ 2014-11-20 18:49 Jessica程序猿 阅读(142) 评论(0) 推荐(0) 编辑
摘要: Dynamic ProgrammingFollow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacl... 阅读全文
posted @ 2014-11-20 14:58 Jessica程序猿 阅读(151) 评论(0) 推荐(0) 编辑
摘要: Dynamic ProgrammingA robot is located at the top-left corner of amxngrid (marked 'Start' in the diagram below).The robot can only move either down or ... 阅读全文
posted @ 2014-11-20 13:47 Jessica程序猿 阅读(153) 评论(0) 推荐(0) 编辑
摘要: Dynamic ProgrammingGiven amxngrid filled with non-negative numbers, find a path from top left to bottom right whichminimizesthe sum of all numbers alo... 阅读全文
posted @ 2014-11-20 13:21 Jessica程序猿 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 声明:翻译仅以技术学习和交流为目的,如需转载请务必标明原帖链接。http://stackoverflow.com/questions/236129/how-to-split-a-string-in-c水平有限,如有翻译不当,欢迎探讨、批评与指正。帖子内容:C++ 切分字符串的最优雅的方式是什么?我们... 阅读全文
posted @ 2014-11-20 10:35 Jessica程序猿 阅读(780) 评论(0) 推荐(0) 编辑
摘要: Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".click to show clarification.Cl... 阅读全文
posted @ 2014-11-20 10:28 Jessica程序猿 阅读(143) 评论(0) 推荐(0) 编辑
上一页 1 ··· 45 46 47 48 49 50 51 52 53 ··· 98 下一页