Dev.Kim
  • 홈
  • 태그
  • 방명록
    • 분류 전체보기 (280)
      • 👨‍💻 Web Development (129)
        • Java (28)
        • Oracle (16)
        • MySQL (1)
        • JDBC | JSP | Servlet (15)
        • HTML | CSS | JS | jQuery (23)
        • Spring - Intro (7)
        • Spring - 기본 (9)
        • Spirng - MVC 패턴 l (7)
        • Spring - Batch (3)
        • HTTP (8)
        • JPA - 기본 (4)
        • React JS (8)
      • 💻 Coding Problems Solving (130)
        • Array | String | Loop (34)
        • Stack | Queue (12)
        • DFS | BFS | Backtracking (24)
        • Dynamic Programming (14)
        • Two Pointers | Binary Searc.. (14)
        • Hash | HashMap (6)
        • Brute Force (6)
        • Greedy (6)
        • Permutations | Combinations (4)
        • Intersection | Union (1)
        • dijkstra | bellman ford | f.. (1)
        • SQL (1)
        • Hack (7)
      • 📘 etc (13)
        • Git (8)
        • Error Solving (4)
        • Job Interview (1)
      • 🏅 Certificate (8)
        • Programming (5)
        • English & German (3)
  • 글작성
  • 방명록
  • 환경설정
  • 메뉴 닫기
💻 Coding Problems Solving/Two Pointers | Binary Search| LinkedList 검색 결과
14 개의 검색 결과가 있습니다.
💻 Coding Problems Solving/Two Pointers | Binary Search| LinkedList

[LeetCode] Container With Most Water

1. 문제 : https://leetcode.com/problems/container-with-most-water/ 막대 높이를 input으로 받았을때 최대로 담을수 있는 물의 양을 구하는 문제 2. 풀이 투포인터로 while문 돌면서 막대 옮겨가며 최대값 update하며 해결 3. 코드 class Solution { public int maxArea(int[] height) { int a=0; int b=height.length-1; int maxVal = Integer.MIN_VALUE; while(b != a){ if(height[a]>height[b]){ maxVal = Math.max(maxVal,(b-a)*height[b]); b--; }else{ maxVal = Math.max(maxVal,..

2023. 3. 28. 23:07
💻 Coding Problems Solving/Two Pointers | Binary Search| LinkedList

[BOJ 14719] 빗물

[BOJ 14719] 빗물 1. 문제 : Link 지형의 높이가 배열로 주어졌을때 고인 빗물의 양을 구하는 문제 2. 풀이 현재 높이를 중심으로 양옆 최대높이를 탐색하는 방법 3. 코드 import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int H = sc.nextInt(); int W = sc.nextInt(); int[] arr = new int[W]; int answer = 0; for (int i = 0; i < W; i++) { arr[i] = sc.nextInt(); } for (int i = 1; i < W - 1; i++) { int curren..

2022. 6. 26. 16:13
  • «
  • 1
  • 2
  • 3
  • »

전체 카테고리

  • 분류 전체보기 (280)
    • 👨‍💻 Web Development (129)
      • Java (28)
      • Oracle (16)
      • MySQL (1)
      • JDBC | JSP | Servlet (15)
      • HTML | CSS | JS | jQuery (23)
      • Spring - Intro (7)
      • Spring - 기본 (9)
      • Spirng - MVC 패턴 l (7)
      • Spring - Batch (3)
      • HTTP (8)
      • JPA - 기본 (4)
      • React JS (8)
    • 💻 Coding Problems Solving (130)
      • Array | String | Loop (34)
      • Stack | Queue (12)
      • DFS | BFS | Backtracking (24)
      • Dynamic Programming (14)
      • Two Pointers | Binary Searc.. (14)
      • Hash | HashMap (6)
      • Brute Force (6)
      • Greedy (6)
      • Permutations | Combinations (4)
      • Intersection | Union (1)
      • dijkstra | bellman ford | f.. (1)
      • SQL (1)
      • Hack (7)
    • 📘 etc (13)
      • Git (8)
      • Error Solving (4)
      • Job Interview (1)
    • 🏅 Certificate (8)
      • Programming (5)
      • English & German (3)
  • 최근 글
  • 최근 댓글

최근 글

최근댓글

블로그 인기글

Powered by Privatenote Copyright © Dev.Kim All rights reserved. TistoryWhaleSkin3.4

티스토리툴바