본문 바로가기 메뉴 바로가기

Jaime's 기술 블로그

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

Jaime's 기술 블로그

검색하기 폼
  • All (499)
    • IntelliJ IDEA (8)
    • SpringBoot (83)
      • Web Application 만들기 (71)
      • JWT 튜토리얼 (5)
    • Java (19)
    • JPA (33)
    • Querydsl (14)
    • SRE (7)
    • gRPC (10)
    • macOS (7)
    • Docker (1)
    • Linux (5)
    • R (5)
    • Test (3)
    • ETC (13)
    • Algorithm (265)
      • LeetCode (258)
    • Retrospect (4)
    • git (1)
    • Architecture (8)
    • Book (10)
      • 함께 자라기 (7)
      • 프로그래머의 뇌 (3)
    • Essay (1)
  • 방명록

Algorithm (265)
560. Subarray Sum Equals K

소스 코드는 여기 있습니다. 문제는 여기 있습니다. Problem Given an array of integers nums and an integer k, return the total number of continuous subarrays whose sum equals to k. Example 1: Input: nums = [1,1,1], k = 2 Output: 2 Example 2: Input: nums = [1,2,3], k = 3 Output: 2 Constraints: 1

Algorithm/LeetCode 2022. 2. 19. 10:30
454. 4Sum II

소스 코드는 여기 있습니다. 문제는 여기 있습니다. Problem Given four integer arrays nums1, nums2, nums3, and nums4 all of length n, return the number of tuples (i, j, k, l) such that: 0 nums1[0] + nums2[0] + nums3[0] + nums4[1] = 1 + (-2) + (-1) + 2 = 0 2. (1, 1, 0, 0) -> nums1[1] + nums2[1] + nums3[0] + nums4[0] = 2 + (-1) + (-1) + 0 = 0 Example 2: Input: nums1 = [0], nums2 = [0], nums3 = [0], nums4 = [0] Output: 1..

Algorithm/LeetCode 2022. 2. 18. 10:30
23. Merge k Sorted Lists

소스 코드는 여기 있습니다. 문제는 여기 있습니다. Problem You are given an array of k linked-lists lists, each linked-list is sorted in ascending order. Merge all the linked-lists into one sorted linked-list and return it. Example 1: Input: lists = [[1,4,5],[1,3,4],[2,6]] Output: [1,1,2,3,4,4,5,6] Explanation: The linked-lists are: [ 1->4->5, 1->3->4, 2->6 ] merging them into one sorted list: 1->1->2->3->4->4->5->6 ..

Algorithm/LeetCode 2022. 2. 17. 10:30
525. Contiguous Array

소스 코드는 여기 있습니다. 문제는 여기 있습니다. Problem Given a binary array nums, return the maximum length of a contiguous subarray with an equal number of 0 and 1. Example 1: Input: nums = [0,1] Output: 2 Explanation: [0, 1] is the longest contiguous subarray with an equal number of 0 and 1.Example 2: Input: nums = [0,1,0] Output: 2 Explanation: [0, 1] (or [1, 0]) is a longest contiguous subarray with equal num..

Algorithm/LeetCode 2022. 2. 16. 10:30
258. Add Digits

소스 코드는 여기 있습니다. 문제는 여기 있습니다. Problem Given an integer num, repeatedly add all its digits until the result has only one digit, and return it. Example 1: Input: num = 38 Output: 2 Explanation: The process is 38 --> 3 + 8 --> 11 11 --> 1 + 1 --> 2 Since 2 has only one digit, return it. Example 2: Input: num = 0 Output: 0 Constraints: 0 test(0, 0) ); } private void test(int given, int expected) { //..

Algorithm/LeetCode 2022. 2. 15. 10:30
389. Find the Difference

소스 코드는 여기 있습니다. 문제는 여기 있습니다. Problem You are given two strings s and t. String t is generated by random shuffling string s and then add one more letter at a random position. Return the letter that was added to t. Example 1: Input: s = "abcd", t = "abcde" Output: "e" Explanation: 'e' is the letter that was added. Example 2: Input: s = "", t = "y" Output: "y" Constraints: 0 test("", "y", &..

Algorithm/LeetCode 2022. 2. 14. 10:30
80. Remove Duplicates from Sorted Array II

소스 코드는 여기 있습니다. 문제는 여기 있습니다. Problem Given an integer array nums sorted in non-decreasing order, remove some duplicates in-place such that each unique element appears at most twice. The relative order of the elements should be kept the same. Since it is impossible to change the length of the array in some languages, you must instead have the result be placed in the first part of the array nums. ..

Algorithm/LeetCode 2022. 2. 13. 10:30
438. Find All Anagrams in a String

소스 코드는 여기 있습니다. 문제는 여기 있습니다. Problem Given two strings s and p, return an array of all the start indices of p's anagrams in s. You may return the answer in any order. An Anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once. Example 1: Input: s = "cbaebabacd", p = "abc" Output: [0,6] Explanation: The..

Algorithm/LeetCode 2022. 2. 7. 10:30
121. Best Time to Buy and Sell Stock

소스 코드는 여기 있습니다. 문제는 여기 있습니다. Problem You are given an array prices where prices[i] is the price of a given stock on the ith day. You want to maximize your profit by choosing a single day to buy one stock and choosing a different day in the future to sell that stock. Return the maximum profit you can achieve from this transaction. If you cannot achieve any profit, return 0. Example 1: Input: pric..

Algorithm/LeetCode 2022. 2. 6. 10:30
189. Rotate Array

소스 코드는 여기 있습니다. 문제는 여기 있습니다. Problem Given an array, rotate the array to the right by k steps, where k is non-negative. Example 1: Input: nums = [1,2,3,4,5,6,7], k = 3 Output: [5,6,7,1,2,3,4] Explanation: rotate 1 steps to the right: [7,1,2,3,4,5,6] rotate 2 steps to the right: [6,7,1,2,3,4,5] rotate 3 steps to the right: [5,6,7,1,2,3,4] Example 2: Input: nums = [-1,-100,3,99], k = 2 Output: [3,..

Algorithm/LeetCode 2022. 2. 5. 10:30
이전 1 ··· 12 13 14 15 16 17 18 ··· 27 다음
이전 다음
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
  • github
TAG
  • r
  • Linux
  • intellij
  • 스프링부트
  • JPA
  • @ManyToOne
  • QueryDSL
  • JSON
  • Jackson
  • leetcode
  • 스프링 부트 튜토리얼
  • spring boot app
  • 스프링 부트 회원 가입
  • Spring Boot
  • 클린 아키텍처
  • Java
  • gRPC
  • 헥사고날 아키텍처
  • 스프링 부트
  • spring boot application
  • 함께 자라기
  • 알고리즘
  • Spring Boot Tutorial
  • 스프링 데이터 jpa
  • Spring Data JPA
  • spring boot jwt
  • 스프링 부트 애플리케이션
  • Spring Boot JPA
  • proto3
  • 함께 자라기 후기
more
«   2025/07   »
일 월 화 수 목 금 토
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
글 보관함

Blog is powered by Tistory / Designed by Tistory

티스토리툴바