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...
1年以上 前
解決済み
No Twins?
Write a function that accepts as input a vector and returns the same vector, but retaining only the first occurrence of an eleme...
1年以上 前
解決済み
Count ones
Write a program to count number of ones (1s) in an integer variable input.
For example:
Input x=2200112231
output y=3
I...
1年以上 前
解決済み
Counting Sequence
Given a vector x, find the "counting sequence" y.
A counting sequence is formed by "counting" the entries in a given sequence...
1年以上 前
解決済み
Scrabble Scores
Given a word, determine its score in <http://en.wikipedia.org/wiki/Scrabble Scrabble>.
The input string will always be provi...
Calculate days until Christmas
Provided with inputs year, month, day e.g. 2019,11,12, calculate the number of days until the next Christmas day, i.e. the next ...
1年以上 前
解決済み
Rescale Scores
Each column (except last) of matrix X contains students' scores in a course assignment or a test. The last column has a weighted...
1年以上 前
解決済み
Adding Inset Plots
You can use the axes function to define the position of an empty x/y axis. The position is measured relative the the bottom left...
1年以上 前
解決済み
Jack O'Lantern
If visualized correctly, the data contained in the matrix A will look like a jack-o'-lantern.
Create a function that will visu...