class Solution { public String solution(String my_string, int s, int e) { String answer = ""; int idx = 0; String revStr = new StringBuilder(my_string.substring(s, e+1)).reverse().toString(); for(int i = 0; i = s && i
class Solution { public String solution(String my_string, int[] indices) { String answer = ""; String[] strArr = my_string.split(""); for(int idx : indices) { strArr[idx] = ""; } for(String str : strArr) { answer += str; } return answer; } }
class Solution { public int solution(int[] date1, int[] date2) { int answer = 0; for(int i = 0; i date2[i]) { break; } else if (date1[i] == date2[i]) { answer = 0; } else { answer = 1; } } return answer; } }
class Solution { public int[] solution(int[] arr, int[][] queries) { int[] answer = new int [arr.length]; for(int[] query : queries) { int num1 = query[0]; int num2 = query[1]; for(int i = 0; i = query[0] && i
class Solution { public String solution(String my_string) { String answer = ""; String[] arrStr = my_string.split(""); for(int i = 0; i < arrStr.length; i++) { if(!answer.contains(arrStr[i])) { answer += arrStr[i]; } } return answer; } }