Community Profile

David Hill

Last seen: Today
1 166 total contributions since 2017

View all

Contributions in
View by

Solved

Connect Four - 01
Connect four is a two player board game. <https://en.wikipedia.org/wiki/Connect_Four> Given a complete connect-four board,...

ungefär 16 timmar ago

Solved

Connect Four - 02
Previous Problem <https://www.mathworks.com/matlabcentral/cody/problems/45354-connect-four-01> In addition to previous proble...

ungefär 16 timmar ago

how can I get successive maximum value from this code?
Why not index B and x? Otherwise, you are overriding their values each time the loop is run. For i =5, max ([70 50]) = 70! Not s...

2 dagar ago | 0

| accepted

Solved

Kissing Circles-01
Three circles are mutually tangent to each other and also to a line. find the radius of the smallest circle. The radius of th...

3 dagar ago

Solved

Number generator
In this problem, a number will be given. starting with the first digit, keep on adding all subsequent digits till the state (...

3 dagar ago

Solved

modular arithmetic
Given three integers a,b and c, find the remainder when a^b is divided by c. Here, a^b will be well beyond the largest 64 bit in...

4 dagar ago

Solved

grazing cows
Here is a fun problem I encountered in high school. Two cows are grazing in an enclosed square-shaped field of side length s ...

4 dagar ago

Solved

Big Integer Sqrt
You will be given a big integer, you should return the square root of it. input: '16' output: '4' have fun!

4 dagar ago

Solved

Cat's paw - 01
lets imagine a cat, standing on an infinitely long row of tiles. since its a 'cat', string length=3; it takes 3 tiles to stand. ...

4 dagar ago

Solved

Area-07
This is a follow up of the problem <https://www.mathworks.com/matlabcentral/cody/problems/45341-area-06> in this case, fi...

4 dagar ago

Solved

Grazing-02
A cow is tied to an outside corner of a rectangular barn of size (a,b) with a rope of length l. What is the maximum area the cow...

5 dagar ago

Solved

Area-05
The dimension of a rectangle is given. There are two circles of equal size that are inscribed inside it.The circles are tangent ...

5 dagar ago

Solved

lucky
check whether n is a lucky number <https://oeis.org/A000959>

5 dagar ago

Solved

Grazing-01
A cow is tied to an outside corner of a rectangular barn of size (a,b) with a rope of length l. What is the maximum area the cow...

5 dagar ago

Solved

Sieve of Eratosthenes
Find the nth lucky prime number. <https://planetmath.org/luckyprime> can u find a way for large n?

6 dagar ago

Solved

Area-06
The length of the side of a square is given. Draw 4 quarter-circles inside the square from 4 corners with a radius equal to t...

6 dagar ago

Solved

volume of torus
Find volume of torus with a as major radius and b as minor

6 dagar ago

Solved

Is it prime?
Given a number, check whether it is prime or not. If prime output is true, otherwise false.

6 dagar ago

Solved

Given a quadratic equation ax^2 + bx + c = 0, write a function to return its roots.

6 dagar ago

Solved

Rank of matrix
Find the rank of given matrix

6 dagar ago

Solved

To convolve two vectors
To convolve two vectors

6 dagar ago

Solved

Output a vector which is table of 9
Output a vector which is table of 9

6 dagar ago

Solved

Permutations of input vector
Find and output all permutations of given vector

6 dagar ago

Solved

Step up
For given input array, output a array with all elements step up by two

6 dagar ago

Solved

Throw common elements of two vector arrays
Throw common elements as output of two given input vector arrays

6 dagar ago

Solved

Throw common elements of two vector arrays in sorted manner
Throw common elements as output in sorted manner (acending order) of two given input vector arrays

6 dagar ago

Solved

string comparision
compare two strings if both are same return 1 else return 0

6 dagar ago

Solved

Delete blanks at the end of string
you got to delete all blank spaces which appears at the end of string

6 dagar ago

Solved

Xor of matrix
you have to set exclusive OR of two arrays

6 dagar ago

Solved

Find minimum and maximum elements of an array
For a given array find minimum and maximum elements of an array and store minimum value in first index of output and maximum in ...

6 dagar ago