코딩 테스트(JAVA)/리트코드(18)
-
[문제10][LeetCode] 561. 배열 파티션 I
https://leetcode.com/problems/array-partition/ Given an integer array nums of 2n integers, group these integers into n pairs (a1, b1), (a2, b2), ..., (an, bn) such that the sum of min(ai, bi) for all i is maximized. Return the maximized sum. 2n개의 정수로 구성된 정수 배열 nums가 주어졌을 때, 이 정수들을 n 쌍의 (a1, b1), (a2, b2), ..., (an, bn)과 같이 그룹화하여 모든 i에 대해 min(ai, bi)의 합이 최대화되도록 합니다. 최대화된 합을 반환하세요. Example 1: Inpu..
2024.03.29 -
[LeetCode] 1091. Shortest Path in Binary Matrix
https://leetcode.com/problems/shortest-path-in-binary-matrix/description/ LeetCode - The World's Leading Online Programming Learning Platform Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com Given an n x n binary matrix grid, return the length of the shortest clear path in the matrix. If the..
2024.01.24 -
[LeetCode] 200. Number of Islands
https://leetcode.com/problems/number-of-islands/description/ LeetCode - The World's Leading Online Programming Learning Platform Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com Given an m x n 2D binary grid grid which represents a map of '1's (land) and '0's (water), return the number of is..
2024.01.24 -
[LeetCode] 785. Is Graph Bipartite?
https://leetcode.com/problems/is-graph-bipartite/description/ Is Graph Bipartite? - LeetCode Can you solve this real interview question? Is Graph Bipartite? - There is an undirected graph with n nodes, where each node is numbered between 0 and n - 1. You are given a 2D array graph, where graph[u] is an array of nodes that node u is adjacent to. Mo leetcode.com 각 노드의 번호가 0에서 n-1 사이인 노드가 n개인 방향성 없..
2024.01.15 -
[LeetCode] 32. Longest Valid Parentheses
https://leetcode.com/problems/longest-valid-parentheses/description/ Longest Valid Parentheses - LeetCode Can you solve this real interview question? Longest Valid Parentheses - Given a string containing just the characters '(' and ')', return the length of the longest valid (well-formed) parentheses substring. Example 1: Input: s = "(()" Output: 2 Explanat leetcode.com Given a string containing..
2024.01.15 -
[LeetCode] 131. Palindrome Partitioning
문제 https://leetcode.com/problems/palindrome-partitioning/description/
2024.01.08