What are the exercises of arrays and strings in Java algorithm
This article mainly introduces the Java algorithm in the array and string exercises, the article is very detailed, has a certain reference value, interested friends must read it!
Topic one
Solution method
Class Solution {public int thirdMax (int [] nums) {Arrays.sort (nums); if (nums.length=0;i--) {if (Nums [I] = Nums [I + 1]) {} else {+ + p; if (packs 3) {return nums [I] } return Nums [nums. Length-1];}} topic 2
Solution method
Class Solution {public List fizzBuzz (int n) {ArrayList list = new ArrayList (); for (int I = 1polii