Strange Coder

Strange Coder

Share

Strange coder is a platform to learn about the technical languages

Data Structure Problems 31/12/2021

Reverse Array : Reverse the given array by using temporary variable. Input : 50, 40, 30, 20, 10 Output : 10, 20, 30, 40, 50 /** * StrangeCoder */ public class ReverseArray { private static void reverse(int[] array, int length) { int reverseArray[] = new int[length]; int j = length; for (int i = 0; i < length; i++) { reverseArray[j-1] = array[i]; j = j - 1; } System.out.println("Printing reversed array : \n"); for (int i = 0; i < reverseArray.length; i++) { System.out.println(reverseArray[i]); } } public static void main(String[] args) { int array[] = {50, 40, 30, 20, 10}; reverse(array, array.length); } } …...

Data Structure Problems Reverse Array : Reverse the given array by using temporary variable. Input : 50, 40, 30, 20, 10 Output : 10, 20, 30, 40, 50 /** * StrangeCoder */ public class ReverseArray { private static …

12/07/2021

Giving people the power to share and learn our experience.

Want your school to be the top-listed School/college in Chennai?

Click here to claim your Sponsored Listing.

Location

Address

Chennai