Given an array, return the element that occurs the most number of consecutive times. In Java

前端 未结 0 1742
盖世英雄少女心
盖世英雄少女心 2021-02-19 13:01

In Java, given the array A[a,a,b,b,b,c,d,e,e] return \'b\' because it appears consecutively more than any other element in the array. I have tried comparing each element with th

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