Dear all,(adsbygoogle = window.adsbygoogle || []).push({});

I'm trying to figure about an efficient way to to get the redundant element in my array.

For instance, lets take the array [0,2,3,0].

I'd like to get out [2,0,3] (or 3,0,2 it doesn't matter).

So it find out which element is duplicated, an puts its value in between the 2 other elements.

The size of my initial array is always 4 and the final one always 3.

The duplicated element can have any index.

It's look very simple, and it certainly is, but I can not figure.

Some help would be very helpful.

Thanks in advance,

Eric.

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Fortran 90 & elements array comparaison

Loading...

Similar Threads for Fortran elements array |
---|

Fortran Successive Over Relaxation Method in FORTRAN |

If statement for Monte Carlo integration |

C/++/# How to use C++ in studying calculus |

Fortran How to buy Fortran Programming Software Commersial License |

Fortran Fortran for Computational Fluid Dynamics Problems |

**Physics Forums | Science Articles, Homework Help, Discussion**