Problem 45434. Weighted Names
Solution Stats
Problem Comments
-
5 Comments
let me know if u find any discrepancy
Asif,
It seems that something is messed up. You didn't say how to score a suffix. If a suffix is scored with the same weight as a last name, then "William III" should score higher than 'William II' in problem 5. If the suffix is not scored at all, then 'william' should score higher than 'William II' or 'William III'. The same sort of problem occurs in problem 4.
if i remember correctly, suffix was supposed to be treated similarly to a prefix. [the 1st letter only]
I can confirm it. For suffixes, just the first letter counts. If it didn't william would be greater than William, since w > W (ASCII value).
Looks like the "J." in "J. S. Kowontan" is treated as a prefix.
Solution Comments
Show commentsProblem Recent Solvers6
Suggested Problems
-
Find the longest sequence of 1's in a binary sequence.
5424 Solvers
-
Check to see if a Sudoku Puzzle is Solved
313 Solvers
-
114 Solvers
-
Find the elements of a matrix according to a defined property.
82 Solvers
-
Right Triangle Side Lengths (Inspired by Project Euler Problem 39)
1469 Solvers
More from this Author165
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!