摘要: Counting Elements Given an integer array arr, count element x such that x + 1 is also in arr. If there're duplicates in arr, count them seperately. Ex 阅读全文
posted @ 2020-04-07 23:30 qwfand 阅读(167) 评论(0) 推荐(0)
摘要: leetcode 49. Group Anagrams Given an array of strings, group anagrams together. Example: Input: ["eat", "tea", "tan", "ate", "nat", "bat"], Output: [ 阅读全文
posted @ 2020-04-06 16:51 qwfand 阅读(120) 评论(0) 推荐(0)
摘要: leetcode 122. Best Time to Buy and Sell Stock II 相关链接 "leetcode" 描述 Say you have an array for which the ith element is the price of a given stock on d 阅读全文
posted @ 2020-04-06 00:14 qwfand 阅读(207) 评论(0) 推荐(0)
摘要: leetcode 121. Best Time to Buy and Sell Stock 相关链接 "leetcode" 描述 Say you have an array for which the ith element is the price of a given stock on day 阅读全文
posted @ 2020-04-05 23:30 qwfand 阅读(139) 评论(0) 推荐(0)
摘要: Table of Contents generated with "DocToc" "ditctaionary and set" "hash 介绍" "集合 set" "创建" "操作和访问集合的元素" "子集、超集、相对判断" "字典 dictionary (map)" "创建字典" "字典的基本 阅读全文
posted @ 2020-04-03 16:47 qwfand 阅读(2891) 评论(0) 推荐(0)
摘要: leetcode 53. Maximum Subarray 链接 "leetcode" 描述 Given an integer array nums, find the contiguous subarray (containing at least one number) which has th 阅读全文
posted @ 2020-04-03 16:17 qwfand 阅读(93) 评论(0) 推荐(0)
摘要: leetcode 202. Happy Number 相关链接 "LeetCode" 描述 Write an algorithm to determine if a number is "happy". A happy number is a number defined by the follow 阅读全文
posted @ 2020-04-03 15:15 qwfand 阅读(106) 评论(0) 推荐(0)
摘要: 136.Single Number 相关链接 "leetcode" 背景知识 Concept原理 If we take XOR of zero and some bit, it will return that bit a⊕0=a(0异或任何数得任何数) If we take XOR of two 阅读全文
posted @ 2020-04-01 19:46 qwfand 阅读(129) 评论(0) 推荐(0)
摘要: 703. Kth Largest Element in a Stream & c++ priority_queue & minHeap/maxHeap 相关链接 "leetcode" "c++ priority_queue cplusplus" "c++ priority_queue cnblog" 阅读全文
posted @ 2020-04-01 09:48 qwfand 阅读(136) 评论(0) 推荐(0)
摘要: [leetcode]1379. Find a Corresponding Node of a Binary Tree in a Clone of That Tree 链接 "leetcode" 描述 Given two binary trees original and cloned and giv 阅读全文
posted @ 2020-03-25 18:39 qwfand 阅读(165) 评论(0) 推荐(0)