Search posts...
class Solution { public int solution(String s) { String[] nums = {"zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"}; for (int i = 0; i < nums.length; i++) { String num = nums[i]; s = s.replace(num, String.valueOf(i)); } return Integer.parseInt(s); } }
stupefyee