Risolto


Travelling Salesman Problem (TSP)
Find a short way through given points. This is the travelling salesman problem. But the solution should be a fast and small func...

oltre un anno fa

Risolto


Make the first letter of a sentence Capital.
In this problem you will be given a string of 2 or 3 lines. Your work is to make the first letters of every line Capital. You wi...

oltre un anno fa

Risolto


Draw a triangle of ones
For any given n, return a matrix that includes a triangle of ones of height n: Example n = 3 output = [0,0,1,0,0 ...

oltre un anno fa

Risolto


Create a column vector of n elements between a and b (both included)
Given lower limit a and an upper limit b, create a column vector of n elements inclusive of a and b. For example: a = 1, b = 4,...

oltre un anno fa

Risolto


Exhaust all possible logical vectors
Input a length argument and list all possible logical vectors of that length. My solution is of size 29. Can you find an even s...

oltre un anno fa

Risolto


A KING AND 100 PRISONERS

oltre un anno fa

Risolto


Flip the diagonal values
Write a program that flip the elements of main diagonal , upper and lower diagonal values of a sqare matrix. For example if a ...

oltre un anno fa

Risolto


Calculate the Distance to Source of Lightning
Lightning discharge heats air rapidly with lightning channels reaching temperatures of up to 50,000 degrees Fahrenheit (which is...

oltre un anno fa

Risolto


Dominant Matrix - 01
A matrix is said to be diagonally dominant if for every row of the matrix, the magnitude of the diagonal entry in a row is large...

oltre un anno fa

Risolto


Sum of 2 numbers in array
Given an array and a target sum, return true if any 2 numbers in the array sum up to the given target sum. Both numbers cannot h...

oltre un anno fa

Risolto


Identifying teenager
Suppose the age of a person is given. If he/she is a teenage, answer is 'yes'. Otherwise, the answer is 'no'.

oltre un anno fa

Risolto


Zero or hero
A number will be given as an input. You can be hero if it's not zero. (Just for fun)

oltre un anno fa

Risolto


Let's create histogram data by yourself.
We'd like to create histogram data, which first column shows the data, and second column shows the frequency. input = [1, 2, 1,...

oltre un anno fa

Risolto


Fangs of pseudo-vampire number
given a number, find all the fangs of that number. A pseudo-vampire number can have multiple of fangs. The output should be a...

oltre un anno fa

Risolto


Pseudo-vampire number
refer to <https://en.wikipedia.org/wiki/Vampire_number> Given a number x, determine whether it is a pseudo-vampire number. A p...

oltre un anno fa

Risolto


Cricket - Is It LBW?
LBW has an unfair reputation as complicated. But if you've watched a third umpire referral, you'll know that it's just a logical...

oltre un anno fa

Risolto


Cricket - Peak Batting Average
Given a vector s of strings representing a batter's individual innings scores (in chronological order), return the highest batti...

oltre un anno fa

Risolto


Cricket - Represent Average in "Dulkars" and "Ses"
Sachin Tendulkar's Test average was 53.78. So if Tendulkar = 53.78, one dulkar = 5.378. Similarly, Roger Twose's average was 25....

oltre un anno fa

Risolto


Cricket - Career Bowling Statistics
Given a vector s of strings representing a bowler's individual innings records, return their career statistics as a 3-element (n...

oltre un anno fa

Risolto


Korselt's Criterion
A composite integer n (n>=2) divides b^n-b, i.e. mod(b^n-b,n)==0, for all integers b if and only if n is square-free (doesn't ha...

oltre un anno fa

Risolto


Cricket - Career Batting Statistics
Given a vector s of strings representing a batter's individual innings scores, return their career statistics as a 4-element (nu...

oltre un anno fa

Risolto


Cricket - How Much More to Beat Bradman?
Sir Don Bradman famously needed only 4 runs in his final innings to retire with an average of 100. Out for a duck, he ended inst...

oltre un anno fa

Risolto


Cricket - Average Partnership Contribution
The (infamous) Duckworth-Lewis method uses statistical models of how much each wicket partnership is worth to an innings (on ave...

oltre un anno fa

Risolto


Cricket - Sort Batters by Distance Run
Given a string vector of batters' names, a vector of the total number of runs they scored, a vector of the number of 4s they sco...

oltre un anno fa

Risolto


Identify Ruth-Aaron numbers
After Hank Aaron hit his 715th home run and passed Babe Ruth’s total of 714, Carl Pomerance noticed that the union of the prime ...

oltre un anno fa

Risolto


Exact Cover
An efficient solution to the exact cover problem can be useful in many situations. In this problem, you are welcome to use Knuth...

oltre un anno fa

Problema


Exact Cover
An efficient solution to the exact cover problem can be useful in many situations. In this problem, you are welcome to use Knuth...

oltre un anno fa | 3 | 7 risolutori

Risolto


List the emirps
An emirp is a prime number that becomes a different prime when reversed. The numbers 13, 17, and 149 are emirps, but 11, 19, and...

oltre un anno fa

Carica altro