The best VPN 2024

The Best VPS 2024

The Best C# Book

Aayush – App Academy – Coding Challenge

Spread the love

Site design & logo © 2018 Pastebin; user contributions (pastes) licensed undercc by-sa 3.0–

We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in theCookies Policy.

Aayush – App Academy – Coding Challenge

Dedicated Server HostingbySteadfast

def subsets(arr) subs=[] for i in 0…arr.length temp_arr=[arr[i]] for j in (i+1)…arr.length temp_arr [arr[i],arr[j..-1]].flatten end subs temp_arr end subs.flatten(1).unshift([]) end

Leave a Comment