Test for balanced parentheses
Given the input inStr, give the boolean output out indicating whether all
the parentheses are balanced.
Examples:
* If ...
2 years 前
已解决
Scrabble Scores
Given a word, determine its score in <http://en.wikipedia.org/wiki/Scrabble Scrabble>.
The input string will always be provi...
Find the two-word state names
Given a list of states, remove all the states that have two-word names.
If
s1 = 'Alabama Montana North Carolina Vermont N...
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...
Find the alphabetic word product
If the input string s is a word like 'hello', then the output word product p is a number based on the correspondence a=1, b=2, ....
2 years 前
已解决
Square a Number
Given an input x, return y, which is equal to the square of x.
2 years 前
已解决
Summing Digits within Text
Given a string with text and digits, add all the numbers together.
Examples:
Input str = '4 and 20 blackbirds baked in a...