Skip to main content
10 events
when toggle format what by license comment
Sep 25, 2016 at 8:23 history closed forsvarir
Dan Oberlam
mdfst13
vnp
janos
Not suitable for this site
Sep 25, 2016 at 7:37 vote accept Кристиян Кацаров
Sep 25, 2016 at 1:30 answer added L3viathan timeline score: 5
Sep 24, 2016 at 22:33 answer added Erik timeline score: 2
Sep 24, 2016 at 21:42 comment added Кристиян Кацаров Yes sample is hypothetical, but it does not matter, the case is to check if all array values are the same in most efficient way...
Sep 24, 2016 at 21:37 review Close votes
Sep 25, 2016 at 8:23
Sep 24, 2016 at 21:23 comment added forsvarir I've voted to close because this reads like hypothetical code (where does 'Sample' come from? As far as efficiency goes, it seems like checking for text != "Sample" and returning false would avoid the need to create and append a collection, then just return true if you make it out of the loop.
Sep 24, 2016 at 20:46 comment added Кристиян Кацаров It is a really general occasion. I use it quite often. Just so you understand, for example checking tic tac toe states (though there you have three winning positions to check if they have the same value, while I try to do this for infinite number of positions)
Sep 24, 2016 at 20:43 comment added Simon Forsberg I can't help but feel that there's some context here that you are not showing us. What is the problem that you are trying to solve exactly? And what's your exact code? (Currently there's no return false in your code for example)
Sep 24, 2016 at 20:30 history asked Кристиян Кацаров CC BY-SA 3.0