테이블 해시 함수1 프로그래머스 테이블 해시 함수 난이도 LV2 풀이 자바 풀이 import java.util.*; class Solution { public int solution(int[][] data, int col, int row_begin, int row_end) { int answer = 0; col = col-1; int finalcol = col; Arrays.sort(data,(o1,o2)->{ if(o1[finalcol]==o2[finalcol]) return o2[0]-o1[0]; return o1[finalcol]-o2[finalcol]; }); for(int i = row_begin-1; ij%x) .sum(); answer = (answer ^ dataTotal); } return answer; } } 파이썬 풀이 def sol.. 2023. 4. 24. 이전 1 다음