国产精品天干天干,亚洲毛片在线,日韩gay小鲜肉啪啪18禁,女同Gay自慰喷水

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

Leetcode 1512 Number of Good Pairs

2022-02-06 14:28 作者:您是打尖兒還是住店呢  | 我要投稿

Given an array of integers?nums, return?the number of?good pairs.

A pair?(i, j)?is called?good?if?nums[i] == nums[j]?and?i?<?j.

?

Example 1:

Input: nums = [1,2,3,1,1,3]Output: 4Explanation: There are 4 good pairs (0,3), (0,4), (3,4), (2,5) 0-indexed.

Example 2:

Input: nums = [1,1,1,1]Output: 6Explanation: Each pair in the array are good.



Runtime:?1 ms, faster than?81.21%?of?Java?online submissions for?Number of Good Pairs.

Memory Usage:?39.7 MB, less than?14.56%?of?Java?online submissions for?Number of Good Pairs.

整體表現(xiàn)不太好。只能說一般。

Leetcode 1512 Number of Good Pairs的評論 (共 條)

分享到微博請遵守國家法律
滨州市| 济宁市| 图木舒克市| 青铜峡市| 伊川县| 文山县| 南安市| 罗定市| 长垣县| 康乐县| 抚顺市| 成武县| 岳阳市| 普安县| 余姚市| 宁波市| 桐庐县| 永安市| 洪湖市| 安泽县| 和田县| 西华县| 江安县| 通山县| 石嘴山市| 塔河县| 沂南县| 陵水| 浦江县| 建德市| 景洪市| 天津市| 海林市| 侯马市| 宁陵县| 白河县| 玉屏| 海淀区| 武乡县| 大安市| 南汇区|