Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Deleting duplicates from arrays?

Author
Message
Golelorn
7
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 19th Apr 2019 17:58
Aside from not inserting duplicates in the first place, does anyone have a quick method of doing this? I suspect just checking to see if the value is already in the array is going to be less complicated.
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Golelorn
7
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 20th Apr 2019 19:24
Thanks, I forgot about that command.
Phaelax
DBPro Master
20
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 29th Apr 2019 08:25 Edited at: 29th Apr 2019 08:25
If you need to check for duplicates in an existing array:



If the array is sorted, then a binary search could be used instead.
Tiled TMX Importer V.2
XML Parser V.2
Base64 Encoder/Decoder
Purple Token - Free online hi-score database
Legend of Zelda

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds

Login to post a reply

Server time is: 2024-03-29 13:50:04
Your offset time is: 2024-03-29 13:50:04