上一页 1 2 3 4 5 6 7 ··· 37 下一页
摘要: Given two strings s and t which consist of only lowercase letters. String t is generated by random shuffling string s and then add one more letter at 阅读全文
posted @ 2020-09-25 16:38 fatttcat 阅读(133) 评论(0) 推荐(0) 编辑
摘要: There are N gas stations along a circular route, where the amount of gas at station i is gas[i]. You have a car with an unlimited gas tank and it cost 阅读全文
posted @ 2020-09-23 16:43 fatttcat 阅读(140) 评论(0) 推荐(0) 编辑
摘要: Given an integer array of size n, find all elements that appear more than ⌊ n/3 ⌋ times. Note: The algorithm should run in linear time and in O(1) spa 阅读全文
posted @ 2020-09-22 16:15 fatttcat 阅读(100) 评论(0) 推荐(0) 编辑
摘要: 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 @ 2020-09-22 16:13 fatttcat 阅读(127) 评论(0) 推荐(0) 编辑
摘要: You are driving a vehicle that has capacity empty seats initially available for passengers. The vehicle only drives east (ie. it cannot turn around an 阅读全文
posted @ 2020-09-21 15:53 fatttcat 阅读(147) 评论(0) 推荐(0) 编辑
摘要: Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transaction 阅读全文
posted @ 2020-09-18 15:35 fatttcat 阅读(97) 评论(0) 推荐(0) 编辑
摘要: Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word (last word means the last appea 阅读全文
posted @ 2020-09-17 16:19 fatttcat 阅读(85) 评论(0) 推荐(0) 编辑
摘要: Given a binary search tree and a node in it, find the in-order successor of that node in the BST. The successor of a node p is the node with the small 阅读全文
posted @ 2020-09-17 15:56 fatttcat 阅读(89) 评论(0) 推荐(0) 编辑
摘要: You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping yo 阅读全文
posted @ 2020-09-14 15:16 fatttcat 阅读(151) 评论(0) 推荐(0) 编辑
摘要: Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary). You may assume that the intervals were initia 阅读全文
posted @ 2020-09-13 18:45 fatttcat 阅读(141) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 37 下一页