about | help | code help+videos | done | prefs |
public int sumNoOnes(int[] nums). Given an array of integers, return the sum of all of the numbers that are NOT equal to 1 and that are NOT next to a 1. sumNotOnes([1, 1, 1, 1]) → 0 sumNotOnes([1, 2, 3, 2, 1]) → 3 sumNotOnes([2, 1, 3, 4, 1, 6, 7, 1, 8]) → 0 ...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: 110
Copyright Nick Parlante 2017 - privacy