Skip to content
Advertisement

Tag: algorithm

What sort algorithm does PHP use?

Internally speaking, which algorithm(s) does PHP use to implement the various sort functions it offers? It seems like the usort variants might use a different algorithm than the built in sorts, but I wanted to know. Where would I even find this information? Thanks! Answer You could find the information by looking at the php manual. http://php.net/sort says PHP uses

Algorithm for generating a random number

I’m looking to generate a random number and issue it to a table in a database for a particular user_id. The catch is, the same number can’t be used twice. There’s a million ways to do this, but I’m hoping someone very keen on algorithms has a clever way of solving the problem in an elegant solution in that the

Advertisement