无码av一区二区三区无码,在线观看老湿视频福利,日韩经典三级片,成 人色 网 站 欧美大片在线观看

歡迎光臨散文網(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的評論 (共 條)

分享到微博請遵守國家法律
中方县| 长乐市| 伊通| 微山县| 山东| 仁化县| 长治县| 石景山区| 青海省| 堆龙德庆县| 海阳市| 关岭| 静宁县| 汉寿县| 夏邑县| 定日县| 宁强县| 扎兰屯市| 临夏县| 图木舒克市| 开江县| 土默特右旗| 松滋市| 镇雄县| 琼中| 富平县| 迁西县| 松原市| 望奎县| 获嘉县| 九江县| 宜昌市| 滕州市| 阳朔县| 夹江县| 瓮安县| 玛纳斯县| 定边县| 三明市| 乌兰察布市| 乌兰浩特市|