Second highest number ArrayList

后端 未结 0 1241
逝去的感伤
逝去的感伤 2021-01-15 07:26

So I got this code so far:

int secondLargest = list.get(0);
int largest = list.get(0);
for (int i = 0; i < list.size(); i++)
{
    if(list.get(i) > lar         


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