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

밀래의 코딩북

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

밀래의 코딩북

검색하기 폼
  • 분류 전체보기 (100)
    • 일상 (3)
    • 개발팁 (4)
    • 네트워크 (3)
    • OS (3)
      • Ubuntu16.04 (1)
      • Mac (1)
    • BackEnd (14)
      • SpringBoot (3)
      • Node (10)
    • FrontEnd (11)
      • React (11)
      • Vue (0)
    • 오픈소스 (1)
      • ElasticSearch (1)
    • Java (1)
    • JavaScript (0)
    • python (14)
    • 머신러닝 (9)
    • 딥러닝 (2)
    • 알고리즘 (17)
      • 백준문제풀이 (2)
      • 알고리즘 공부 (1)
      • LeetCode 공부 (14)
    • Git (2)
    • Docker (5)
    • React Native (8)
    • ChatGpt 활용법 (2)
    • AI Agent (0)
  • 방명록

[LeetCode] Java - Maximal Square

27일차 LeetCode 도전 입니다. Maximal Square. 1. 문제 Maximal Square 라는 문제입니다. 1로 구성된 정사각형의 넓이를 구하는 문제입니다. 위의 예제로 보면 1이 4칸으로 구성된 정사각형이고 2 2 이기 때문에 답은 2*2로 4가 출력됩니다. 해당 문제는 DP 기본 문제로 생각보다 쉽게 구현이 가능합니다. 2. 풀이 class Solution { public int maximalSquare(char[][] matrix) { int n = matrix.length; if(n == 0) return 0; int m = matrix[0].length; int[][] DP = new int[n+1][m+1]; int max = 0; for(int i=1; i

알고리즘/LeetCode 공부 2020. 4. 30. 20:07
[LeetCode] Java - Last Stone Weight

12일차 Last Stone Weight 입니다. -문제 : https://leetcode.com/explore/challenge/card/30-day-leetcoding-challenge/529/week-2/3297/ We have a collection of stones, each stone has a positive integer weight. Each turn, we choose the two heaviest stones and smash them together. Suppose the stones have weights x and y with x

알고리즘/LeetCode 공부 2020. 4. 12. 17:14
[Leet Code] Java - Counting Elements

7일차 Counting Elements 입니다. - 문제 - 풀이 class Solution { public int countElements(int[] arr) { Set set = new HashSet(); for(int i=0; i

알고리즘/LeetCode 공부 2020. 4. 10. 22:19
[LeetCode] Java - Group Anagrams

6일차 Group Anagrams 입니다. - 문제 - 풀이 class Solution { public List groupAnagrams(String[] strs) { HashMap map = new HashMap(); List items = new ArrayList(); int k = 0; for(int i=0; i

알고리즘/LeetCode 공부 2020. 4. 8. 21:12
[LeetCode] Java - Best Time to Buy and Sell Stock II

leetCode 5일차 리뷰 입니다. 문제 이름은 Best Time to Buy and Sell Stock II - 문제 - 풀이 문제를 잘 읽어보면 생각보다 쉽게 문제를 풀 수 있는 방법을 찾을 수 있습니다. 배열의 1번째 index부터 시작해서 이전 숫자보다 크면 두개의 차이를 계속 더해나가면 문제에서 의도하는 해를 구 할 수 있죠. 문제에서 몇일에사서 가장 비싼일에 판다고 했지만 그 차이는 하루하루의 차이를 더한것과 같기 때문이죠 그래서 문제는 아래와 같이 풀 수 있습니다. class Solution { public int maxProfit(int[] prices) { int r = 0; for(int i=1; i prices[i-1]) r += prices[i] - prices[i-1]; retu..

알고리즘/LeetCode 공부 2020. 4. 7. 20:50
[LeetCode] Java - Move Zeroes

LeetCode 30 Day Challenge 4일차 입니다. 문제 이름은 Move Zeroes - 문제 문제는 숫자 배열이 주어지고 in-place로 옮겨야 합니다. 함수를 call by reference 로 해결해야 한다는 의미 입니다. 주어진 변수 nums안의 데이터를 옮겨 해결한다는 의미 입니다. - 풀이 class Solution { public void moveZeroes(int[] nums) { int temp = 0, zeroCount = 0; if(nums[0] == 0) zeroCount++; for(int i=1; i

알고리즘/LeetCode 공부 2020. 4. 6. 01:00
이전 1 2 3 4 5 6 7 8 ··· 17 다음
이전 다음
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
  • 노드
  • 파이썬
  • Java
  • 리엑트
  • LeetCode 알고리즘 공부
  • 에라토스테네스
  • GPT서비스
  • 30 Day LeetCode Challenge
  • 퍼셉트론
  • Component
  • LeetCode 5월 챌린지
  • Node
  • 머신러닝
  • React 프로젝트 생성
  • k8s metrics-server running
  • k8s metrics-server
  • vscode
  • GPTGOT
  • react
  • Java leetcode
  • 버츄얼스튜디오코드
  • LeetCode 풀이
  • CHATGOT
  • 파이썬 numpy
  • numpy
  • git
  • Python
  • 넘파이
  • 지도학습
  • LeetCode 30일 챌린지
more
«   2025/12   »
일 월 화 수 목 금 토
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

티스토리툴바