FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
To Reverse an array without function
How-ToTools

To Reverse an array without function

via Dev.toAbirami Prabhakar2h ago

To carry out reversing a array without function considering all the approaches in the refernce link https://www.geeksforgeeks.org/write-a-program-to-reverse-an-array-or-string/?authuser=2 I took interest in the two pointer approach as it was about swapping the left -> end right -> start even when there are odd number of events we can leave the middle element untouched and it has a very simple ideology and can be implemented with simple swap functions and very efficent in terms of time and space constraint in comparision to the other approaches is also very beginner friendly the code block I used was : # initilize the value of left pointer as the first index value and right pointer as the last index value def reversearray ( arr ): left = i right = len ( arr ) - 1 while left < right : arr [ left ], arr [ right ] = arr [ right ], arr [ left ] #the index value in increased in right and decreased in right left = left + 1 right = right - 1 return arr print ( reversearray ([ 4 , 5 , 1 , 2 ])

Continue reading on Dev.to

Opens in a new tab

Read Full Article
0 views

Related Articles

What Makes a Good Open Source PR (Lessons From Getting Mine Closed)
How-To

What Makes a Good Open Source PR (Lessons From Getting Mine Closed)

Dev.to • 47m ago

Hoto’s powerful PixelDrive electric screwdriver is 25 percent off
How-To

Hoto’s powerful PixelDrive electric screwdriver is 25 percent off

The Verge • 1h ago

How I turned my Pixel phone into a genuinely productive desktop computer - for free
How-To

How I turned my Pixel phone into a genuinely productive desktop computer - for free

ZDNet • 2h ago

the world is your oyster - you can just do things.
How-To

the world is your oyster - you can just do things.

Medium Programming • 2h ago

The Sonos Bluetooth Speaker Is $40 Off
How-To

The Sonos Bluetooth Speaker Is $40 Off

Wired • 3h ago

Discover More Articles