Skip to content

Latest commit

 

History

History
27 lines (23 loc) · 497 Bytes

File metadata and controls

27 lines (23 loc) · 497 Bytes

Print all Sub Arrays Of An Array

Easy


  1. You are given an array of size 'n' and n elements of the same array.
  2. You are required to find and print all the subarrays of the given array.
  3. Each subarray should be space seperated and on a seperate lines.

Example 1:

Input:  n= 3, a[]= {10, 20, 30}  
Output:  
10	
10 20	
10 20 30	
20	
20 30	
30	

Constraints:

1 <= n <= 10
0 <= n1, n2
 .. n elements <= 10 ^9