트러블 슈팅 썸네일형 리스트형 HashSet의 객체 중복 제거 public class VisitLength { //방문길이 public static void main(String[] args) { String dirs = "ULURRDLLU"; System.out.println(solution(dirs)); } public static int solution(String dirs) { Coordinate coordinate = new Coordinate(0,0); HashSet hashSet = new HashSet(); for(int i=0; i=-5){ coordinate.update(-1,0); hashSet.add(new Coordinate(coordinate.getX()+0.5, coordinate.getY())); } break; case 'R': if(.. 더보기 N+1 문제 해결 @Entity @Getter @NoArgsConstructor @AllArgsConstructor public class Request extends Timestamped { @GeneratedValue(strategy = GenerationType.IDENTITY) @Id @Column(name = "REQUEST_ID") private Long id; @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "POST_ID") private Post post; @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "USER_ID") private User user; @Enumerated(value = EnumType.S.. 더보기 이전 1 다음