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...
11개월 전
문제를 풀었습니다
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...
11개월 전
문제를 풀었습니다
Counting Sequence
Given a vector x, find the "counting sequence" y.
A counting sequence is formed by "counting" the entries in a given sequence...
11개월 전
문제를 풀었습니다
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...
11개월 전
문제를 풀었습니다
Card Game
This is an overly simplified and highly modified version of card game Twenty-Nine.
A deck of 100 unique cards (hypothetical) ...
11개월 전
문제를 풀었습니다
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:...