上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 37 下一页
摘要: Given an array of integers sorted in ascending order, find the starting and ending position of a given target value. Your algorithm's runtime complexi 阅读全文
posted @ 2017-12-05 11:59 immjc 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 作用:声明外部变量。使变量或对象可以被跨文件访问 c++语言支持分离式编译机制,该机制允许将程序分割为若干个文件,每个文件可被独立编译。 因此在编译期间,各个文件中定义的全局变量互相不透明,也就是说,在编译时,全局变量的可见域限制在文件内部。 对于A.cpp和B.cpp中,分别含有同名全局变量i,两 阅读全文
posted @ 2017-12-04 11:17 immjc 阅读(1183) 评论(0) 推荐(0) 编辑
摘要: Given two sentences words1, words2 (each represented as an array of strings), and a list of similar word pairs pairs, determine if two sentences are s 阅读全文
posted @ 2017-12-01 18:01 immjc 阅读(314) 评论(0) 推荐(0) 编辑
摘要: An image is represented by a 2-D array of integers, each integer representing the pixel value of the image (from 0 to 65535). Given a coordinate (sr, 阅读全文
posted @ 2017-12-01 10:06 immjc 阅读(153) 评论(0) 推荐(0) 编辑
摘要: Suppose you have a long flowerbed in which some of the plots are planted and some are not. However, flowers cannot be planted in adjacent plots - they 阅读全文
posted @ 2017-11-21 16:20 immjc 阅读(195) 评论(0) 推荐(0) 编辑
摘要: Write a program to find the node at which the intersection of two singly linked lists begins. For example, the following two linked lists: A: a1 → a2 阅读全文
posted @ 2017-11-21 10:55 immjc 阅读(128) 评论(0) 推荐(0) 编辑
摘要: Implement a MyCalendarTwo class to store your events. A new event can be added if adding the event will not cause a triple booking. Your class will ha 阅读全文
posted @ 2017-11-20 16:54 immjc 阅读(176) 评论(0) 推荐(0) 编辑
摘要: Implement a MyCalendar class to store your events. A new event can be added if adding the event will not cause a double booking. Your class will have 阅读全文
posted @ 2017-11-20 16:21 immjc 阅读(375) 评论(0) 推荐(0) 编辑
摘要: A self-dividing number is a number that is divisible by every digit it contains. For example, 128 is a self-dividing number because 128 % 1 == 0, 128 阅读全文
posted @ 2017-11-20 11:24 immjc 阅读(749) 评论(0) 推荐(0) 编辑
摘要: Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive. Example: Note: 求一个数组的范围和,可以使用动态规划来计算。 dp[x]数组表示原 阅读全文
posted @ 2017-11-19 17:58 immjc 阅读(112) 评论(0) 推荐(0) 编辑
上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 37 下一页