Code examples for the Algorithms tag - developer knowledge base ()

Create a binary tree in Python with a step-by-step example: learn how to use classes, set up nodes, and traverse a tree.
Generate random numbers in Python with an example: Learn how to create a random number in Python using the random module and a simple function.
Creating a list from a collection in Python is easy - use list comprehension to quickly transform a set into an ordered list. E.g. lst = [x for x in {1,2,3}]
Learn how to sort data in php w/ an example: use the array_multisort() function to organize & order your data quickly & easily.
Create complex functions quickly with php recursion: learn how to use it with a detailed example.
1