Return true if multiple non consecutive duplicates are present in the array

前端 未结 0 1966
死守一世寂寞
死守一世寂寞 2021-01-15 04:56

[c,a,a,b,b,d], [c,a,b,b,d,d,a] or [a,a,b,b,c,d,d] should return false while [a,a,c,d,b,b] or [a,a,c,b,b,d] should return true as the duplicates are not consecutive.



        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题