26 November 2007

search array actionscript functions

Few months ago I wrote some search array functions. Since than I found them very useful, so I decided to publish them here. I have added one more function shuffle, which gives new array from given one but with randomly located elements.

here is short description of functions:

function search finds element in array and displays result
function searchB finds element in array and returns Boolean value
function searchCount returns number of apperances of element in array
function union returns union array of two arrays
function shuffle simply shuffles elements of given array and returns new array

will continue to add more.



lance said...

These are super! I have seen the shuffle function before, but never understood the logic behind why it works. Can anyone break it down?

Freddie Sirmans said...

Nice blog, very interesting.

Mattaka said...

Union is not different from intersection


template by blogger templates