public void attachWagonFromLeft(int wagonId) wagons.addFirst(wagonId);
Open your IDE, copy the LongestConsecutive solution, and add your own edge cases. Then search for "TestDome Java free trial" and put your skills to the test. testdome java questions and answers
abstract class BaseIceCream implements IceCream protected int scoops = 0; public void addScoop(String flavor) scoops++; public double getTotalPrice() return scoops * 1.5; public void attachWagonFromLeft(int wagonId) wagons