about | help | code help+videos | done | prefs |
boolean firstLastEqualsDoubleMiddle(int[] nums). Given an array of ints which has an odd length, return true if the sum of the first and last elements equals twice the value of the middle element. firstLastEqualsDoubleMiddle([1, 1, 1]) → true firstLastEqualsDoubleMiddle([8, 7, 6]) → true firstLastEqualsDoubleMiddle([10, 20, 30, 40, 50]) → true ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 105
Copyright Nick Parlante 2017 - privacy