Any ideas on How to search a 2D array quickly?
Posted
by Tattat
on Stack Overflow
See other posts from Stack Overflow
or by Tattat
Published on 2010-03-30T14:21:10Z
Indexed on
2010/03/30
14:23 UTC
Read the original article
Hit count: 369
I jave a 2D array like this, just like a matrix:
{{1, 2, 4, 5, 3, 6},
{8, 3, 4, 4, 5, 2},
{8, 3, 4, 2, 6, 2},
//code skips... ...
}
I want to get all the "4" position, instead of searching the array one by way, and return the position, how can I search it faster / more efficient? thz in advance.
© Stack Overflow or respective owner