上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 14 下一页

2018年11月21日

摘要: Design a HashMap without using any built-in hash table libraries. To be specific, your design should include these functions: put(key, value) : Insert 阅读全文
posted @ 2018-11-21 11:25 chiyeung 阅读(238) 评论(0) 推荐(0)

2018年11月16日

摘要: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may comple 阅读全文
posted @ 2018-11-16 10:40 chiyeung 阅读(111) 评论(0) 推荐(0)
摘要: Given a column title as appear in an Excel sheet, return its corresponding column number. For example: A -> 1 B -> 2 C -> 3 ... Z -> 26 AA -> 27 AB -> 阅读全文
posted @ 2018-11-16 10:06 chiyeung 阅读(114) 评论(0) 推荐(0)

2018年11月15日

摘要: Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. Symbol Value I 1 V 5 X 10 L 50 C 100 D 500 M 1000 For example, two 阅读全文
posted @ 2018-11-15 10:00 chiyeung 阅读(203) 评论(0) 推荐(0)

2018年11月13日

摘要: Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times. You may assume that the 阅读全文
posted @ 2018-11-13 10:16 chiyeung 阅读(168) 评论(0) 推荐(0)
摘要: Write a function to delete a node (except the tail) in a singly linked list, given only access to that node. Given linked list -- head = [4,5,1,9], wh 阅读全文
posted @ 2018-11-13 10:09 chiyeung 阅读(156) 评论(0) 推荐(0)

2018年11月12日

摘要: Reverse a singly linked list. Example: 阅读全文
posted @ 2018-11-12 19:08 chiyeung 阅读(118) 评论(0) 推荐(0)

2018年11月10日

摘要: You need to construct a string consists of parenthesis and integers from a binary tree with the preorder traversing way. The null node needs to be rep 阅读全文
posted @ 2018-11-10 10:52 chiyeung 阅读(199) 评论(0) 推荐(0)

2018年11月9日

摘要: Given two arrays, write a function to compute their intersection. Example 1: Example 2: Input: nums1 = [4,9,5], nums2 = [9,4,9,8,4] Output: [9,4] Exam 阅读全文
posted @ 2018-11-09 09:28 chiyeung 阅读(132) 评论(0) 推荐(0)

2018年11月8日

摘要: Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -. Example 1: Input: a = 1, b = 2 Output: 3 Example 2: In 阅读全文
posted @ 2018-11-08 11:41 chiyeung 阅读(357) 评论(0) 推荐(0)
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 14 下一页

导航