TIL

· TIL
1. createSchedule - scheduleControllerpackage com.example.scheduleappserver.controller;import com.example.scheduleappserver.dto.ScheduleRequestDto;import com.example.scheduleappserver.dto.ScheduleResponseDto;import com.example.scheduleappserver.entity.Schedule;import org.springframework.stereotype.Controller;import org.springframework.web.bind.annotation.PostMapping;import org.springframework.we..
· TIL
package com.sparta.springmvc.request;import org.springframework.stereotype.Controller;import org.springframework.web.bind.annotation.*;@Controller@RequestMapping("/hello/request")public class RequestController { @GetMapping("/form/html") public String helloForm() { return "hello-request-form"; } // Path Variable => 경로에 값을 넣는 방식 // [Request sample] // GET http://localhost..
· TIL
제일 작은 수 제거하기 코드class Solution { public int[] solution(int[] arr) { int[] answer = {}; int[] arr2 = arr.clone(); int temp = 0; if(arr.length > 1){ for(int i=0; i 회고처음에는 [4, 3, 2, 1] 내림차순으로 만들어서 마지막 값을 제거하여 문제를 풀어가려했지만, 문제를 잘못이해한 것 같다. 제일 작은 값을 제거하고 그 배열은 그대로 출력하는 거였는데.. 그래서 처음에 배열을 하나 복사하고 첫 배열을 내림차순으로 만든 후 마지막 값을 가장 작은 값으로 인지하고 복사한 두번째 배열에서 같은 값을..
· TIL
핸드폰 번호 가리기 실행 코드class Solution { public String solution(String phone_number) { String answer = ""; char[] number = phone_number.toCharArray(); for(int i=0; i
· TIL
콜라츠 추측   풀이class Solution { public int solution(long num) { int answer = 0; while(num != 1){ if(answer >= 500){ answer = -1; break; } if(num % 2 == 0){ num = num / 2; }else{ num = (num * 3) + 1; } answer ++; } return answer; }..
· TIL
· TIL
· TIL
빨간망토감자도리
'TIL' 카테고리의 글 목록