about | help | code help+videos | done | prefs |
kthEven
Find the Kth positive even number, where 0th is 0, 1st is 2, etc. Do this recursively, think how can you express the Kth even number in terms of a smaller even number? This is very obviously 2*k, but the goal is to do it recursively! kthEven(0) → 0 kthEven(1) → 2 kthEven(2) → 4 ...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