TRON strategy toggle
Detect whether your lightcycle is on same side of existing walls as opponents lightcycle. This function is useful in toggling a...
Test if two numbers have the same digits
Given two integers _x1_ and _x2_, return |true| if the numbers written with no leading zeros contain the same digits. That is, t...
Sum the Digits of a Number
Given an integer, sum the digits repeatedly until you end up with a single value less than 10.
For example, if you add the di...
4年弱 前
解決済み
Binary Inversion
Given the unsigned 8-bit integer x, return the number y which is the binary inversion of x.
For example if x is 5, y should b...
Easy Sequences 23: Hat Guessing Game!
Consider the following Game Show:
Hats, with numbers written on each, were placed on the heads of the participants. Participant...
4年弱 前
解決済み
Find the inverse permutation
Given a permutation vector perm (a vector of n elements containing all the elements from 1 to n in some order), return the permu...
4年弱 前
解決済み
Which way to go?
Given an m*n grid,
How many ways are there to go from upper left corner to the lower right one?
You can only move right...
4年弱 前
解決済み
Number of paths on a n-dimensional grid
This problem is inspired by <https://www.mathworks.com/matlabcentral/cody/problems/1483-number-of-paths-on-a-grid> and <https:/...
4年弱 前
解決済み
Number of paths on a 3d grid
This problem is inspired by <https://www.mathworks.com/matlabcentral/cody/problems/1483-number-of-paths-on-a-grid>, which you mi...
4年弱 前
解決済み
How many rectangles in a grid ?
How many rectangles are there in an m × n grid ?
For example, if m=1 & n=2, we have 3 rectangles.
4年弱 前
解決済み
Number of paths on a grid
Consider a grid formed by n vertices vertically down, and m vertices horizontally right. Your starting point is at the top lef...