| 1 | class Solution |
| 2 | { |
| 3 | String printSequence(String sentence) |
| 4 | { |
| 5 | // code here |
| 6 | String output=""; |
| 7 | |
| 8 | String arr[] = {"2","22","222", "3","33","333","4","44","444","5","55","555","6","66","666", "7","77","777","7777","8","88","888","9","99","999","9999"}; |
| 9 | |
| 10 | for(int i=0;i<sentence.length();i++) |
| 11 | { |
| 12 | if(sentence.charAt(i)==' ') output+="0"; |
| 13 | else output+=arr[sentence.charAt(i)-'A']; |
| 14 | } |
| 15 | return output; |
| 16 | } |
| 17 | } |
nothing calls this directly
no outgoing calls
no test coverage detected