ChallengeRocket
  • Challenges
  • Find jobs
  • Candidate Hub
  • For business
  • Log in
  • Sign up now
Menu
  • Home
  • Challenges
  • All Possible Subarrays

All Possible Subarrays

All Possible Subarrays

Before you start the test, check out our tutorial challenge

Before you start the test, check out our tutorial challenge

~25MIN
Start: Nov 24, 2019
CODE CHALLENGE
  • Challenge outline
  • Tips
  • Leaderboard
All Possible Subarrays
  • Challenge outline
  • Tips
  • Leaderboard

Challenge overview

Hello and welcome to the challenge!


Write a code that returns all possible subarrays of the given array with distinct integers. Subarrays should obey the rule of order shown in the example.

Example

  • solve([1,2,3]) -> [[], [1], [2], [1, 2], [3], [1, 3], [2, 3], [1, 2, 3]]

Input

  • an array with integers

Output

  • the array with all found subarrays in the proper order

Constraints

  • 0 < length of the given array < 100


You can solve this programming contest in C++, C#, Ruby, JavaScript, Python and many other languages. If you want, you can also take part in other November 2019 competitions. Below you can find some of them:


  • Proper Fractions
  • Nice Colors Only!
  • Smaller Number With The Same Digits


Have fun and good luck! :)

By using our site, you agree to challengerocket's use of cookies in accordance with our privacy policy.
ChallengeRocket
Tech talent
Challenges Blog Find jobs Candidate Hub
Companies
Business HR Blog Pricing
Challengerocket
FAQ EU Join Us Contact Us
We connect Top Tech Talent with Companies. We are community of software developers, engineers, data scientists and tech lovers.
Copyright © 2021 ChallengeRocket. All rights reserved.
Privacy Terms and Conditions Service status

Sign in

Don’t have account?
Create a new account
or

Forgot your password?

Log in

Forgot your password?

Don’t have an account?  Start a free trial

Create a new account

Already have an account?
Log in
or
  • At least 8 characters
  • Uppercase Latin characters
  • Lowercase Latin characters
  • At least one number or symbol

Reset your password

Have an account? Log in Log in for business

Start a free trial

  • At least 8 characters
  • Uppercase Latin characters
  • Lowercase Latin characters
  • At least one number or symbol