작성했는데 틀린 문장. 테스트 케이스도 다 맞고 내가 생각하기로는 분명히 다 검사 후 체크를 하는데 왜 틀렸습니다가 나오는지 궁금했다. 해결 방법 : 나는 문제의 정의에서 하나는 맨 왼쪽 위 칸이 흰색인 경우, 하나는 검은색인 경우 를 생각해서 처음에 조건문으로 적
Given an array a that contains only numbers in the range from 1 to a.length, find the first duplicate number for which the second occurrence has the m
Given a string s consisting of small English letters, find and return the first instance of a non-repeating character in it. If there is no such chara
Given an array of equal-length strings, you'd like to know if it's possible to rearrange the order of the elements in such a way that each consecutive
Given a string, find the shortest possible string which can be achieved by adding characters to the end of initial string to make it a palindrome.For
A media access control address (MAC address) is a unique identifier assigned to network interfaces for communications on the physical network segment.
Construct a square matrix with a size N × N containing integers from 1 to N \* N in a spiral order, starting from top-left and in clockwise direction.
Implement the missing code, denoted by ellipses. You may not modify the pre-existing code.You're given two integers, n and m. Find position of the rig
https://leetcode.com/problems/search-a-2d-matrix-ii/description/Write an efficient algorithm that searches for a value target in an m x n integer
Given a string s, find the length of the longest substring without repeating characters.Example 1:Input: s = "abcabcbb"Output: 3Explanation: The answ
읽는데 8분정도 소요되는 글입니다. 감사합니다. 목차 1. 문제 설명 2. Monotonic Stack이란? 3. 문제 풀이 1. 문제 설명 Given string num representing a non-negative integer num, and an int
읽는데 5분정도 소요되는 글입니다. 감사합니다. 233. Number of Digit One Given an integer n, count the total number of digit 1 appearing in all non-negative integers les
difficulty: MediumGiven a list of non-negative integers nums, arrange them such that they form the largest number and return it.음수가 아닌 정수들의 배열이 주어지면,
2876\. Count Visited Nodes in a Directed GraphHardThere is a directed graph consisting of n nodes numbered from 0 to n - 1 and n directed edges.0부터 n-
DAG에서 모든 조상 노드 찾기
You are given an integer array nums. Two players are playing a game with this array: player 1 and player 2.Player 1 and player 2 take turns, with play
MediumGiven two integers a and b, return the sum of the two integers without using the operators + and -.Example 1:Input: a = 1, b = 2Output: 3Example