About 6,490,000 results
Open links in new tab
  1. Symmetric pairs in an array - GeeksforGeeks

    Apr 4, 2025 · Given an array of pairs arr[], a pair (a, b) is said to be symmetric with (c, d) if b = c and a = d. In other words, reversing the elements of one pair should result in the other pair. …

  2. java - Checking if array is symmetric - Stack Overflow

    Dec 20, 2016 · public class symm { /* * Returns true if array A is symmetric. * Returns false otherwise. * n is the number of elements A contains. * * The running time of your algorithm is …

  3. Symmetric Elements in an Array in Java | PrepInsta

    Symmetric Elements in an Array in Java. Here, in this page we will discuss the program to find all symmetric elements in an array in Java programming language. We are given with pairs and …

  4. Checking if an array in C is symmetric - Stack Overflow

    Mar 8, 2015 · I'm working on an example problem and its asking me to check of a user inputted array is symmetric. I've figured out how to do it by creating another array, copying over the first …

  5. Solved Java - Find All Symmetric Pairs in an | Chegg.com

    Java - Find All Symmetric Pairs in an Array. Description Given an array of pairs of integers, find all the symmetric pairs in it. Two pairs (a, b) and (c, d) are said to be symmetric if b is equivalent …

  6. Find all symmetric pairs in an array of pairs | Techie Delight

    Aug 12, 2021 · Given an array of pairs of integers, find all symmetric pairs, i.e., pairs that mirror each other. For instance, pairs `(x, y)` and `(y, x)` are mirrors of each other.

  7. C++ program to find all symmetric elements in an array

    Symmetric Elements in an Array in C++. Here, in this page we will discuss the program to find all symmetric elements in an array in C++ programming language. We are given with pairs and …

  8. Chapter 7. Arrays - introprogramming.info

    An array is symmetric if the first and the last elements are equal and at the same time the second element and the last but one are equal as well and so on. On the figure a few examples for …

  9. Find all symmetric pairs in an array of pairs - Techgeekbuzz

    Feb 10, 2025 · Given an array of pairs, find all symmetric pairs in it. Symmetric pairs are two pairs . (a, b) and . (b, a) for two arbitrary integers a and b. We can create a hashmap in which key …

  10. java - Elements in an Array symmetric - Stack Overflow

    May 14, 2015 · If you want to reflect the whole array, here's the code for it: int[] b = new int[a.length<<1]; System.arraycopy(a, 0, b, 0, a.length); int i, j; for (j = a.length-1, i = 0; j>=0; j--, …

  11. Some results have been removed
Refresh