【leetcode_easy_array】1346. Check If N and Its Double Exist

problem

1346. Check If N and Its Double Exist

solution1: two loop;

code

 

solution2:哈希表;

code

 

solution3: 使用set类型;

code

 

 

注意:

1. 倍数可能在后,也可能在前;

2. 熟练掌握map和set的使用方法;

参考

1. leetcode_1346. Check If N and Its Double Exist;

posted on 2020-07-15 22:31  鹅要长大  阅读(108)  评论(0编辑  收藏  举报

导航