随笔分类 -  Leetcode

摘要:题目 Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. push(x) Push element x onto stack. pop() Removes 阅读全文
posted @ 2019-08-25 16:32 冰芒 阅读(207) 评论(0) 推荐(0)
摘要:题目 You have a lock in front of you with 4 circular wheels. Each wheel has 10 slots: '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'. The wheels can r 阅读全文
posted @ 2019-08-25 16:31 冰芒 阅读(582) 评论(0) 推荐(0)
摘要:题目 Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, ...) which sum to n. 给定正整数 n,找到若干个完全平方数(比如 1 阅读全文
posted @ 2019-08-25 16:30 冰芒 阅读(192) 评论(0) 推荐(0)
摘要:题目 Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adja 阅读全文
posted @ 2019-08-25 16:28 冰芒 阅读(246) 评论(0) 推荐(0)
摘要:[Leetcode/Javascript] 461.Hamming Distance 题目 The Hamming distance between two integers is the number of positions at which the corresponding bits are 阅读全文
posted @ 2017-07-23 17:50 冰芒 阅读(247) 评论(0) 推荐(1)