Category: math
We can compute the Greatest Common Divisor (GCD) using Iterative Divide/Remainder Method. The following is the GCD implementation in BASH Programming: #!/bin/bash function gcd() { local x=$1 local y=$2 …
Teaching Kids Programming: Videos on Data Structures and Algorithms You are given integers n, a and b. You are standing in a line of n people. You don’t know …
Teaching Kids Programming: Videos on Data Structures and Algorithms Given a square matrix mat, return the sum of the matrix diagonals. Only include the sum of all the elements …
Teaching Kids Programming: Videos on Data Structures and Algorithms You are given a lists of non-negative integers nums. Sort the list in ascending order by the number of 1s …
Teaching Kids Programming: Videos on Data Structures and Algorithms You are given a list of integers bricks and integers width and height. Each bricks represents a 1 x bricks …