Tag: stack
Recursion is an important programming concepts. Recursion can be used to simplify your algorithm implementation but at a cost of possible stack-over-flow pitfalls. This tutorial will provide a simple-to-follow …
Return the preorder traversal of a binary tree’s nodes’ values. The pre-order displays the root/current node’s value first, then recursively calling into its left sub tree and right sub …
Given a singly linked list, determine if it is a palindrome. A palindrome is a string/number that mirrors itself, for example, 21312 reverse is also 21312. We are given …
Given a string that consists of words (non-space characters count as part of a word), you are required to output the new sentence that reverses the words. For example, …
February 18, 2014
algorithms, beginner, brainfuck, c / c++, code, code library, data structure, implementation, programming languages, string
The problem is from LeetCode Online Judge . The puzzle appears to be the most-favourite interview questions. It asks you to implement an algorithm to check if a given …