无码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的評論 (共 條)

分享到微博請遵守國家法律
镇巴县| 镇平县| 宜州市| 鹤岗市| 沐川县| 莱芜市| 会宁县| 光山县| 五峰| 探索| 广宁县| 汉阴县| 右玉县| 青阳县| 罗江县| 留坝县| 屯门区| 灵石县| 阜新市| 上犹县| 新蔡县| 深圳市| 仪陇县| 富顺县| 万盛区| 梁河县| 从江县| 墨脱县| 博乐市| 彩票| 油尖旺区| 榆社县| 湘乡市| 离岛区| 蒲江县| 涞水县| 龙泉市| 柏乡县| 合山市| 青川县| 灵寿县|