Some simple computational problems to practice Duke 7-steps
Instructions: Provide the first three steps of the Duke 7 steps for the following computational problems:
- Given a string, return the first character that is repeated. If none is repeated, return the character '\0'.
- Given an array of non-negative integers of size 2 or more, return true if one of the elements is equal to the sum of the rest of the elements, false otherwise.
- Given a positive integer N, determine if N is divisible by the sum of its digits
- Determine if a string contains exactly the same amount of each letter ("abcbca" contains 2 a's, 2 b's and 2 c's)
- Determine the median of a possible unsorted array of integers (you may assume that a sort function exists)
- Given a string of lowercase letters, determine which character repeats the most. If two or more characters repeat the most return the character '\0'. Refrain from deleting characters!