about | help | code help+videos | done | prefs |
public int getTwiceSumOf1stAnd2nd(int[] nums)
public int getTwiceSumOf1stAnd2nd(int[] nums) { int sum = nums[0] + nums[1]; int val = sum * 2; return val; } getTwiceSumOf1stAnd2nd([4, 1]) → 10 getTwiceSumOf1stAnd2nd([9, 5, 6, 1]) → 28 getTwiceSumOf1stAnd2nd([21, 7, 4, 3, 1]) → 56 ...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: 1
Copyright Nick Parlante 2017 - privacy