最新 最热

Leetcode 题目解析之 Valid Anagram

Given two strings s and t, write a function to determine if t is an anagram of s.

2022-01-14
1

Kotlin 运算符重载

语法糖表达式实际调用函数a + ba.lus(b)a - ba.minus(b)a * ba.times(b)a / ba.div(b)a % ba.rem(b)a++a.inc()a--a.dec()+aa.unaryPlus()-aa.unaryMinus()!aa.not...

2022-01-13
2

怎样去掉list里重复的数据(多种方法)

去掉list重复的数据,目前总结的以下三种方法,分别是采用set集合来做、两层循环不用任何方法来做,以及一层循环采用contains()方法来做,如下:

2022-01-10
1

LeetCode笔记:728. Self Dividing Numbers

只需要遍历区间内所有数字,对每个数依次得到每一位的数字,然后试试能不能整除就可以了,很简单,这里我把判断的代码写到另一个函数里,看起来更清晰。...

2021-11-23
1

22 Self Dividing Numbers

A self-dividing number is a number that is divisible by every digit it contains.

2021-08-18
1

LeetCode 0164 - Maximum Gap

Given an unsorted array, find the maximum difference between the successive elements in its sorted form.

2021-08-11
1

LeetCode 0217 - Contains Duplicate

Given an array of integers, find if the array contains any duplicates.

2021-08-11
2

HDU 1512 - Monkey King

Once in a forest, there lived N aggressive monkeys. At the beginning, they each does things in its own way and none of them knows each other. But monkeys can’t ...

2021-08-11
1

LeetCode 0304 - Range Sum Query 2D - Immutable

Given a 2D matrix matrix, find the sum of the elements inside the rectangle defined by its upper left corner (row1, col1) and lower right corner (row2, col2).

2021-08-11
1