Re: Algorithm to Remove An Element Based on Value of Particular Element Position
- Posted by Spock Jul 23, 2015
- 1517 views
euphoric said...
petelomax said...
that looks pretty easy, is there anything wrong with this?
There's so much wrong with that code, but I don't have time to get into it.
HAHHAHAA!
Just kiddin'. I forgot about using 'exit' to break out. I was looping from end to beginning. Ugh.
Thanks!
That example code removes one element if it finds a match. Is it possible there might be more than one to be removed? This was kinda implied by the question but not stated outright. It's good to clarify these things..
Spock