Category: math
A strobogrammatic number is a number that looks the same when rotated 180 degrees (looked at upside down). Write a function to determine if a number is strobogrammatic. The …
Given a positive integer num, write a function which returns True if num is a perfect square else False. Note: Do not use any built-in library function such as …
Given an array that has n integers, find a sub array of given length k that has the maximum average value. Write a function that outputs the maximum average …
Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are sorted from left …
In MATLAB, there is a very useful function called ‘reshape’, which can reshape a matrix into a new one with different size but keep its original data. You’re given …