class Solution { public int solution(String myString, String pat) { int answer = 0; if(myString.toLowerCase().contains(pat.toLowerCase())) { answer = 1; } return answer; } }
class Solution { public int[] solution(int[] num_list) { int[] answer = new int [5]; for(int i = 0; i num_list[j]) { int tmp = num_list[i]; num_list[i] = num_list[j]; num_list[j] = tmp; } } } System.arraycopy(num_list, 0, answer, 0, answer.length); return answer; } }
class Solution { public String[] solution(String my_string) { String[] answer = {}; answer = my_string.split(" "); return answer; } }
class Solution { public int[] solution(int[] num_list) { int len = num_list.length+1; int[] answer = Arrays.copyOf(num_list, len); System.arraycopy(num_list, 0, answer, 0, num_list.length); if(num_list[num_list.length-1] > num_list[num_list.length-2]) { answer[answer.length-1] = num_list[num_list.length-1] - num_list[num_list.length-2]; } else { answer[answer.length-1] = num_list[num_list.length..
class Solution { public int[] solution(int[] arr) { int[] answer = new int [arr.length]; int idx = 0; for(int i = 0 ; i = 50 && arr[i] % 2 == 0) { answer[idx] += arr[i] / 2; } else if (arr[i] < 50 && arr[i] % 2 == 1) { answer[idx] += arr[i] * 2; } else { answer[idx] += arr[i]; } idx++; } return answer; } }