menu
techminis

A naukri.com initiative

google-web-stories
Home

>

Programming News

>

Given an a...
source image

Prodevelopertutorial

1d

read

146

img
dot

Given an array, find all the repeated elements in C language.

  • The solution is very simple.
  • Traverse through the array and make the element in that index negative to mark it as unique.
  • If a repeated element is encountered, check if it is negative and print it as a repeated element.
  • Example: For input {1, 3, 2, 7, 5, 1, 3}, the output will be 1, 3.

Read Full Article

like

8 Likes

For uninterrupted reading, download the app