摘要: 题目:You are a product manager and currently leading a team to develop a new product. Unfortunately, the latest version of your product fails the qualit 阅读全文
posted @ 2016-05-10 21:57 CodingGirl121 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 题目: Write a function to find the longest common prefix string amongst an array of strings. 题目解答: 求一组字符串的最长公共前缀。使用迭代器数组实现。思路异常的简单。 代码如下: class Solution 阅读全文
posted @ 2016-05-10 12:03 CodingGirl121 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1's in their binary representation a 阅读全文
posted @ 2016-05-10 12:01 CodingGirl121 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 题目: Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive. Example: Note: 题目解答:这个题目说了,会反复的求一段数字的和,但是默认数 阅读全文
posted @ 2016-05-10 11:36 CodingGirl121 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a singly linked list, determine if it is a palindrome. Follow up: Could you do it in O(n) time and O(1) space? 题目解答:题目中要求在O(n)的时间复杂度和O(1)的空间 阅读全文
posted @ 2016-04-28 19:02 CodingGirl121 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 题目: Find the total area covered by two rectilinear rectangles in a 2D plane. Each rectangle is defined by its bottom left corner and top right corner 阅读全文
posted @ 2016-04-28 14:36 CodingGirl121 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a binary tree, return all root-to-leaf paths. For example, given the following binary tree: All root-to-leaf paths are: 题目解答:使用递归的方式来处理这道题目, 阅读全文
posted @ 2016-04-27 19:29 CodingGirl121 阅读(156) 评论(0) 推荐(0) 编辑
摘要: 题目: Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array. Note:You may assume that nums1 has enough space (size 阅读全文
posted @ 2016-04-25 21:07 CodingGirl121 阅读(107) 评论(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: begin to 阅读全文
posted @ 2016-04-25 16:50 CodingGirl121 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 题目:Implement the following operations of a stack using queues. push(x) -- Push element x onto stack. pop() -- Removes the element on top of the stack. 阅读全文
posted @ 2016-04-25 16:28 CodingGirl121 阅读(123) 评论(0) 推荐(0) 编辑