Birthday Cake Candles

  • + 0 comments

    java solution i made ..

    int max = Integer.MIN_VALUE;
     for(int i = 0 ;i<candles.size();i++){
      if(max<candles.get(i)){
         max = candles.get(i); i=0; }
    	 if(max>candles.get(i)){
    	candles.remove(i); i=0; }
    		} return candles.size(); }