Given a non-negative integer c, your task is to decide whether there’re two integers a&…
分类:LeetCode
[LeetCode] Subdomain Visit Count 子域名访问量统计
A website domain like “discuss.leetcode.com” consists of various subdomains. At the top lev…
[Leetcode] Peeking Iterator 瞥一眼迭代器
Peeking Iterator Given an Iterator class interface with methods: next() and hasNext(), design and implement a …
[Leetcode] Minimum Window Substring 最小字符串窗口
Minimum Window Substring Given a string S and a string T, find the minimum window in S which will contain all …
226. Invert Binary Tree
226. Invert Binary Tree 题目: https://leetcode.com/problems/invert-binary-tree/ 难度: Easy class Solution(object):…
832. Flipping an Image
题目地址:https://leetcode.com/problems/flipping-an-image/description/ 大意:两次反转二元矩阵,第一次将子元素序列倒置,第二次将子元素的子元素0变1,1变0。所…
LeetCode算法题-Power Of Two(Java实现)
这是悦乐书的第194次更新,第200篇原创 01 看题和准备 今天介绍的是LeetCode算法题中Easy级别的第56题(顺位题号是231)。给定一个整数,写一个函数来确定它是否是2的幂。例如: 输入:1 输出:true…
LeetCode算法题-Relative Ranks(Java实现)
这是悦乐书的第248次更新,第261篇原创 01 看题和准备 今天介绍的是LeetCode算法题中Easy级别的第115题(顺位题号是506)。根据N名运动员的得分,找到他们的相对等级和得分最高的三个人,他们将获得奖牌:…
134. Gas Station
欢迎fork and star:Nowcoder-Repository-github 134. Gas Station 题目 There are N gas stations along a circular route…
LeetCode | Convert Sorted Array to Binary Search Tree
题目: Given an array where elements are sorted in ascending order, convert it to a height balanced BST. 思路: 自顶向下…
LeetCode 238 Product of Array Except Self
题目描述 Given an array of n integers where n > 1, nums, return an array output such that output[i] is equal to…
[LintCode][Two Pointers] Two Sum II.md
Problem More Discussions Given an array of integers, find how many pairs in the array such that their sum is b…