Category: Recursion
June 23, 2021
algorithms, BASH, bash script, Combination, math, Permutation, programming languages, Recursion, recursive, string
Swap Two Characters in BASH In BASH, we can use “${#string}” to get the length of a string. And in a function, we use “local” keyword to declare local …
Teaching Kids Programming: Videos on Data Structures and Algorithms Given a binary tree root, repeatedly delete all leaves that have even values. That is, if after deletions, a node …
Teaching Kids Programming: Videos on Data Structures and Algorithms In Python, we have itertools.product that calculates the Cartesian Product of a few list or tuple. For example: from itertools …
Teaching Kids Programming: Videos on Data Structures and Algorithms Given two integers n and k, return all possible combinations of k numbers out of 1 … n. You may …
Teaching Kids Programming: Videos on Data Structures and Algorithms Given a binary search tree (BST), find the lowest common ancestor (LCA) node of two given nodes in the BST. …