Can we print all subarrays of an array in O(n) or O(nlogn)?

1 posts Fri, Jun 11, 2021 at 10:43 AM in New Here & Getting Started

We are given an array of n integers. We need to print all subarrays of the given array. I've done it using loops and using recusrion but they have a bad time coplexity. Can we do it efficiently?

View: Threaded  |  Flat
+0

Comments

  • 431 posts Mon, Jun 14, 2021 at 11:02 AM

    May want to ask in the development forums?

    +0
Sign In or Register to comment.