Web appOpen in Telegram

PostReverse an array

26 June 2025
<
</> ᴍᴜᴋᴇsʜ </>
Reverse an array public class reverseArr { public static void reverse(int numbers[]) { int start = 0; int last = numbers.length - 1; while (start < last) { int temp = numbers[last]; numbers[last] = numbers[start]; numbers[start] = temp; start++; last--; } } public static void main(String[] args) { int numbers[] = { 2, 4, 6, 8, 10, 12, 14, 16 }; reverse(numbers); for (int i = 0; i < numbers.length; i++) { System.out.print(numbers[i] + " "); } } } // time complexbilty: 0(n) // space complexbilty: 0(1) Output: 16 14 12 10 8 6 4 2
4 · 1.5K ·

Nearby in the feed

<</> ᴍᴜᴋᴇsʜ </>Hollow Rhombus Pattern for number n public class hollowrhombus { public static void hollowrhombus_pattern(int n) { for (int i = 1; i <= n; i++) { for (int j = 1<</> ᴍᴜᴋᴇsʜ </>Diamond Pattern of number n public class diamond { public static void diamond_pattern(int n) { for (int i = 1; i <= n; i++) { // blank space for (int j = 1; j <
this message
<</> ᴍᴜᴋᴇsʜ </>Subarray public class subArr { public static void subArray(int numbers[]) { for (int i = 0; i < numbers.length; i++) { int start = i; // subarr for (in<</> ᴍᴜᴋᴇsʜ </>Maximum Subarray sum using Kadane's Algorithm. import java.util.*; public class Kadane { public static void kaddanelgoSum(int numbers[]) { int currsum = 0; int
JJava Codes Basic to AdvanceJava Codes Basic to Advance@Java_Codes_Pro · channel · Tech
1 988subscribers213posts in the index
Venue feed Open in Telegram

An open public feed from the search index ChatCrawler — “Google for public Telegram”; refreshed as the venue is crawled. Times are UTC.

Public content only, official Telegram API. About · FAQ · What we do not do · Remove a page · Catalog · Search · How we count