문제
예시
내 풀이
public int[] solution(String[] intStrs, int k, int s, int l) {
int[] answer = {};
ArrayList<Integer> list = new ArrayList<Integer>();
for(int j = 0; j < intStrs.length; j++)
{
StringBuilder sb = new StringBuilder();
for(int i = s; i < s + l; i++)
{
sb.append(intStrs[j].charAt(i));
}
String result = sb.toString();
if(Integer.parseInt(result) > k)
{
list.add(Integer.parseInt(result));
}
}
answer = new int[list.size()];
for(int i = 0; i < list.size(); i++)
{
answer[i] = list.get(i);
}
return answer;
}