上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 21 下一页
摘要: 本文将主要从static在C和C++共有的作用及C++特有的作用两个方面进行解析。在C和C++中共有的作用隐藏(对变量、函数均可) 当同时编译多个文件时,所有未加static前缀的全局变量或全局函数都具有全局性。举例来说明,同时编译两个源文件,一个是a.c,另一个是main.c,如下:1 //... 阅读全文
posted @ 2015-06-21 12:05 峰子_仰望阳光 阅读(2027) 评论(0) 推荐(0) 编辑
摘要: 1.Contains Duplicate 题目链接 题目要求: Given an array of integers, find if the array contains any duplicates. Your function should return true if any val... 阅读全文
posted @ 2015-06-20 20:39 峰子_仰望阳光 阅读(210) 评论(0) 推荐(0) 编辑
摘要: 题目链接 题目要求: Given an array of integers, every element appearstwiceexcept for one. Find that single one. Note: Your algorithm should have a linear... 阅读全文
posted @ 2015-06-20 16:44 峰子_仰望阳光 阅读(202) 评论(0) 推荐(0) 编辑
摘要: 题目链接 题目要求: Determine if a Sudoku is valid, according to:Sudoku Puzzles - The Rules. The Sudoku board could be partially filled, where empty cells... 阅读全文
posted @ 2015-06-20 16:20 峰子_仰望阳光 阅读(187) 评论(0) 推荐(0) 编辑
摘要: 1. Two Sum 题目链接 题目要求: Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum shoul... 阅读全文
posted @ 2015-06-20 13:39 峰子_仰望阳光 阅读(284) 评论(0) 推荐(0) 编辑
摘要: 题目链接 题目要求: Given a non-negative number represented as an array of digits, plus one to the number. The digits are stored such that the most signif... 阅读全文
posted @ 2015-06-20 11:15 峰子_仰望阳光 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 题目链接 题目要求: 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 room... 阅读全文
posted @ 2015-06-19 18:52 峰子_仰望阳光 阅读(202) 评论(0) 推荐(0) 编辑
摘要: 题目链接 题目要求: Given a list of non negative integers, arrange them such that they form the largest number. For example, given[3, 30, 34, 5, 9], the l... 阅读全文
posted @ 2015-06-19 11:58 峰子_仰望阳光 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 题目链接 题目要求: The string"PAYPALISHIRING"is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in ... 阅读全文
posted @ 2015-06-17 16:54 峰子_仰望阳光 阅读(399) 评论(0) 推荐(0) 编辑
摘要: 题目链接 题目要求: Rotate an array ofnelements to the right byksteps. For example, withn= 7 andk= 3, the array[1,2,3,4,5,6,7]is rotated to[5,6,7,1,2,3,4]... 阅读全文
posted @ 2015-06-17 14:48 峰子_仰望阳光 阅读(197) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 21 下一页