code a function that receives an array with duplicates and returns a new array keepin

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Charuaashini
    New Member
    • Jul 2015
    • 1

    code a function that receives an array with duplicates and returns a new array keepin

    code a function that receives an array with duplicates and returns a new array keeping the original order of the elements but with the duplicates removed.
    for example ,if the input were
    @[@"dog",@"cat",@ "dog",@"fis h"]
    the output would be
    @[@"dog",@"cat",@ "fish"]
  • donbock
    Recognized Expert Top Contributor
    • Mar 2008
    • 2427

    #2
    We won't write the program for you.
    Please refer to Posting Homework or Coursework Questions and Answers in the Posting Guidelines.

    I suggest you start by hard-coding a small set of test arrays so you can focus on the comparing array entries and removing duplicates rather than get sidetracked by data entry.

    Comment

    Working...