If you like to save 4 mins of reading time, here's the summary:
Given an integer n, find the sum of 20 + 21 + ... + 2n.
If you speak binary, and knowing that: 10 - 1 = 1 100 - 1 = 11 1000 - 1 = 111
if n = 4, the answer will be 24+1 - 1.
You're welcome.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
If you like to save 4 mins of reading time, here's the summary:
Given an integer n, find the sum of 20 + 21 + ... + 2n.
If you speak binary, and knowing that:
10 - 1 = 1
100 - 1 = 11
1000 - 1 = 111
if n = 4, the answer will be 24+1 - 1.
You're welcome.