An algorithm is a sequence of well-defined steps that defines an abstract solution to a problem.

How do I check if an array includes a value in JavaScript?

What is the most concise and efficient way to find out if a JavaScript array contains a value? This is …

javascript arrays algorithm time-complexity javascript-objects
Removing duplicates in the lists

Pretty much I need to write a program that checks if a list has any duplicates and if it does …

python algorithm list duplicates intersection
What does O(log n) mean exactly?

I am learning about Big O Notation running times and amortized times. I understand the notion of O(n) linear …

algorithm time-complexity big-o
What is the optimal algorithm for the game 2048?

I have recently stumbled upon the game 2048. You merge similar tiles by moving them in any of the four directions …

algorithm logic artificial-intelligence 2048
Calculate distance between two latitude-longitude points? (Haversine formula)

How do I calculate the distance between two points specified by latitude and longitude? For clarification, I'd like the distance …

algorithm math maps latitude-longitude haversine
How to find time complexity of an algorithm

The Question How to find time complexity of an algorithm? What have I done before posting a question on SO ? …

algorithm time-complexity complexity-theory
What is a plain English explanation of "Big O" notation?

I'd prefer as little formal definition as possible and simple mathematics.

algorithm complexity-theory computer-science big-o time-complexity
How to generate all permutations of a list?

How do you generate all the permutations of a list in Python, independently of the type of elements in that …

python algorithm permutation combinatorics python-2.5
Best way to reverse a string

I've just had to write a string reverse function in C# 2.0 (i.e. LINQ not available) and came up with …

c# .net performance algorithm unicode
Finding the max/min value in an array of primitives using Java

It's trivial to write a function to determine the min/max value in an array, such as: /** * * @param chars * @return …

java arrays algorithm frameworks