Thread: Delete elements "off the curve" from an array.

  1. #1
    Registered User
    Join Date
    Nov 2008
    Location
    Santa Catarina - Brasil
    Posts
    184

    Delete elements "off the curve" from an array.

    Hi Guys,

    I need to delete elements that are "off the curve" from an array.

    Example:

    -10
    -11
    -12
    -10
    0 (Delete This value)
    -9
    -13

  2. #2
    Registered User
    Join Date
    Oct 2006
    Posts
    3,445
    You have to shift all the elements with indexes greater than the deleted element to fill the gap. If you want the ability to simply remove an element, without needing to move the others, you'll need a linked list.
    What can this strange device be?
    When I touch it, it gives forth a sound
    It's got wires that vibrate and give music
    What can this thing be that I found?

  3. #3
    Registered User
    Join Date
    Jun 2015
    Posts
    1,643
    I was assuming he meant how to determine which element(s) to remove, not how to remove them. Something like curve fitting or outlier detection.

  4. #4
    Registered User
    Join Date
    Nov 2008
    Location
    Santa Catarina - Brasil
    Posts
    184
    Thanks Algorism,
    Exactly what I need

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. A "Simple" Array/String Problem. "Help" ASAP needed
    By AirulFmy in forum C Programming
    Replies: 10
    Last Post: 08-19-2015, 04:30 AM
  2. Replies: 39
    Last Post: 07-28-2013, 08:24 PM
  3. Replies: 4
    Last Post: 07-17-2012, 09:02 AM
  4. "itoa"-"_itoa" , "inp"-"_inp", Why some functions have "
    By L.O.K. in forum Windows Programming
    Replies: 5
    Last Post: 12-08-2002, 08:25 AM
  5. "CWnd"-"HWnd","CBitmap"-"HBitmap"...., What is mean by "
    By L.O.K. in forum Windows Programming
    Replies: 2
    Last Post: 12-04-2002, 07:59 AM

Tags for this Thread