about | help | code help+videos | done | prefs |
Given a Stack of integers, return the number of elements in the stack. YOUR FIRST TWO LINES OF CODE MUST BE: Stack<Integer> stack = new Stack<Integer>(); stack.addAll(list); stack_numberOfElements([1, 2, 3, 4]) → 4 stack_numberOfElements([1, 2, 3]) → 3 stack_numberOfElements([1, 2]) → 2 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Copyright Nick Parlante 2017 - privacy