Print “0”, if N equal zero, and “1” in another case. For solution you can use only arithmetic operations.
algorithms
Nice question
Найти середину связного списка за один проход. Длина заранее не известна, а есть только указатель на голову.
Ответ в продолжениий поста белым по белому:
10 TOP Algorithms
A* search algorithm
Graph search algorithm that finds a path from a given initial node to a given goal node. It employs a heuristic estimate that ranks each node by an estimate of the best route that goes through that node. It visits the nodes in order of this heuristic estimate. The A* algorithm is therefore an example of best-first search. Continue reading