Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...
environ un an il y a
A résolu
Mongean Shuffle
A Mongean shuffle of an n card deck starts with putting the initial deck on the left hand side.
* The top card of the deck is...
environ un an il y a
A résolu
Counting Sequence
Given a vector x, find the "counting sequence" y.
A counting sequence is formed by "counting" the entries in a given sequence...
environ un an il y a
A résolu
The Dark Knight
The current position of the knight is x
The desired destination is y
The size of the chessboard is n.
Find the minimu...
environ un an il y a
A résolu
Card Game
This is an overly simplified and highly modified version of card game Twenty-Nine.
A deck of 100 unique cards (hypothetical) ...
environ un an il y a
A résolu
Times 2 - START HERE
Try out this test problem first.
Given the variable x as your input, multiply it by two and put the result in y.
Examples:...