Toggle navigation
Code Exercises
Practice Now
More Info
Blog
Contact
Easy
Moderate
Challenging
Sum of Two Numbers
Sum Multiples of Three and Five
Factorial
Linear Search
Reverse String
Find Maximum
Average Value (Java 8 Lambdas and Streams)
Convert to Upper Case (Java 8 Lambdas and Streams)
Nth Odd Element
Number Of Tree Nodes
Count Nodes in List
Nth Odd Element
Write a method that returns th nth element of a list. If the index of the element exceeds the list size, then return -1.
public Integer getElement(List<Integer> list, Integer n) {
}
Submit
Clear
Solution