202103-18 算法训练营第二周 哈希表/映射/集合/树/图/堆 第二周学习笔记 哈希表 是根据关键码值(Key value)而直接进行访问的数据结构。 元素 ==> 散列函数 ==> 存储位置 search/delete/insert时的时间复杂度可认为是O(1) HashMap key-value存储在Node[]数组中 static .... Read More >
202103-16 算法训练营第一周 数组 链表 跳表 栈 队列 第一周学习笔记 数组 Array 在内存中开辟出的一块连续空间 操作 复杂度 查找 O(1) 插入 O(n) 删除 O(n) prepend O(1) append O(1) 链表 Linked List .... Read More >
202003-16 [LeetCode每日一题]264. Ugly Number II 题目如下: Write a program to find the n-th ugly number. Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. Example: Input: n.... Read More >
202003-16 [LeetCode每日一题]263. Ugly Number 题目如下: Write a program to check whether a given number is an ugly number. Ugly numbers are positive numbers whose prime factors only include 2, 3, 5.... Read More >
202003-12 [LeetCode每日一题]213. House Robber II 题目如下: You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed. All houses at this plac.... Read More >
202003-12 [LeetCode每日一题]198. House Robber 题目如下: You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint sto.... Read More >
202003-11 [LeetCode每日一题]140. Word Break II 题目如下: Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, add spaces in s to construct a sentence where each .... Read More >
202003-08 [LeetCode每日一题]139. Word Break 题目如下: Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, determine if s can be segmented into a space-separa.... Read More >
202003-07 [LeetCode每日一题]95. Unique Binary Search Trees II 题目如下: Given an integer n, generate all structurally unique BST's (binary search trees) that store values 1 ... n. Example: Input: 3 Output: [ [1.... Read More >
202003-06 [LeetCode每日一题]96. Unique Binary Search Trees 题目如下: Given n, how many structurally unique BST's (binary search trees) that store values 1 ... n? Example: Input: 3 Output: 5 Explanation: Given .... Read More >