human
Subarray / Substring vs Subsequence and Programs to Generate them | Prints all subarrays in arr [ 0. . n - 1 ].
Pick starting point.
Pick ending point.
Print subarray between current starting and ending points.
Driver program"
Solution in Python:
assistant
#Here is code to subarray / Substring vs Subsequence and Programs to Generate them and the other steps required.
 def subArray ( arr , n ) :
	for i in range ( 0 , n ) :
		for j in range ( i , n ) :
			for k in range ( i , j + 1 ) :
				print ( arr [ k ] , end = " ▁ " )
			print ( " " , end = " " )
arr = [ 1 , 2 , 3 , 4 ]
n = len ( arr )
print ( " All ▁ Non - empty ▁ Subarrays " )
subArray ( arr , n ) ;