목록분류 전체보기 (943)
넘치게 채우기
https://leetcode.com/problems/find-the-difference-of-two-arrays/description/ Find the Difference of Two Arrays - LeetCodeCan you solve this real interview question? Find the Difference of Two Arrays - Given two 0-indexed integer arrays nums1 and nums2, return a list answer of size 2 where: * answer[0] is a list of all distinct integers in nums1 which are not present in nums2leetcode.com문제 유형 : 해..
https://leetcode.com/problems/divide-two-integers/description/ Divide Two Integers - LeetCode Can you solve this real interview question? Divide Two Integers - Given two integers dividend and divisor, divide two integers without using multiplication, division, and mod operator. The integer division should truncate toward zero, which means losing it leetcode.com 문제 유형 : 수학 / 자료형 난이도 : Medium 문제 G..
https://school.programmers.co.kr/learn/courses/30/lessons/1844 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 문제 유형 : BFS 난이도 : Level 2 문제 (1, 1)에서 시작하는 캐릭터를 (n,m)으로 보내는데 필요한 거리를 구하시오(단, 캐릭터는 상하좌우만 이동가능하다) 불가능한 경우 -1을 반환한다 입력 2차원 배열 maps가 주어지고, 벽은 0 ,갈 수 있는 지역은 1로 표시된다. n, m은 1 이상 100 이하이다. n과 m 모두 1인 경우는 존재하지 않는다. 출력 필요한 거리를 출력. 단,..
https://school.programmers.co.kr/learn/courses/30/lessons/12906 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 문제 유형 : 스택 / 큐 문제 난이도 : Level 1 문제 설명 배열 arr가 주어집니다. 배열 arr의 각 원소는 숫자 0부터 9까지로 이루어져 있습니다. 이때, 배열 arr에서 연속적으로 나타나는 숫자는 하나만 남기고 전부 제거하려고 합니다. 단, 제거된 후 남은 수들을 반환할 때는 배열 arr의 원소들의 순서를 유지해야 합니다. 예를 들면, arr = [1, 1, 3, 3, 0, 1, 1..
백트래킹 기법은 해를 찾는 도중, 해가 될 가능성이 없으면 이전으로 되돌아가면서 시간을 아끼는 방법이다. 보통 구현 방식은 DFS의 중간에 조건식을 넣어서, 더 깊게 들어가봤자 의미가 없다는 것을 판단시킨 후, 이전으로 돌아가게 하는 식으로 한다. 이 과정을 가지치기라고 하고, 이 가지치기의 조건을 얼마나 잘 설정하느냐가 관건이 된다.
Brute Force. 무식한 힘이란 뜻인데, 풀어 말하면 무식하게 풀기라고 할 수 있다. 완전히 모든 경우를 탐색하여 조건에 맞는 결과를 가져오는 것이다. 속도가 어떻게 될지라도, 반드시 결과를 가져온다. 선형 구조에서는 주로 순차 탐색, 비선형 구조에서는 BFS와 DFS등을 주로 사용한다. 장점으로는 반드시 답을 찾는다는 점이고, 단점으로는 느리거나 메모리를 많이 사용할 수 있다는 점이다. 브루트 포스의 문제 해결 과정 1. 주어진 문제를 구조화 한다. 2. 구조화 된 문제의 모든 해를 구하도록 탐색한다. 3. 구성된 해를 정리한다.
https://leetcode.com/problems/average-salary-excluding-the-minimum-and-maximum-salary/description/ Average Salary Excluding the Minimum and Maximum Salary - LeetCodeCan you solve this real interview question? Average Salary Excluding the Minimum and Maximum Salary - You are given an array of unique integers salary where salary[i] is the salary of the ith employee. Return the average salary of em..
https://leetcode.com/problems/n-th-tribonacci-number/description/?envType=study-plan-v2&id=dynamic-programming N-th Tribonacci Number - LeetCode Can you solve this real interview question? N-th Tribonacci Number - The Tribonacci sequence Tn is defined as follows: T0 = 0, T1 = 1, T2 = 1, and Tn+3 = Tn + Tn+1 + Tn+2 for n >= 0. Given n, return the value of Tn. Example 1: Input: n = 4 Output: 4 E l..
https://leetcode.com/problems/fibonacci-number/description/?envType=study-plan-v2&id=dynamic-programming Fibonacci Number - LeetCode Can you solve this real interview question? Fibonacci Number - The Fibonacci numbers, commonly denoted F(n) form a sequence, called the Fibonacci sequence, such that each number is the sum of the two preceding ones, starting from 0 and 1. That is, F(0) = 0 leetcode..
https://leetcode.com/problems/reverse-integer/description/ Reverse Integer - LeetCode Can you solve this real interview question? Reverse Integer - Given a signed 32-bit integer x, return x with its digits reversed. If reversing x causes the value to go outside the signed 32-bit integer range [-231, 231 - 1], then return 0. Assume the envir leetcode.com 문제 유형 : 수학 난이도 : Medium 문제 Given a signed ..