목록PS (468)
넘치게 채우기
https://leetcode.com/problems/matrix-diagonal-sum/description/ Matrix Diagonal Sum - LeetCode Can you solve this real interview question? Matrix Diagonal Sum - Given a square matrix mat, return the sum of the matrix diagonals. Only include the sum of all the elements on the primary diagonal and all the elements on the secondary diagonal that are leetcode.com 문제 유형 : 투 포인터 문제 난이도 : Easy 문제 Given ..
#include // 모든 라이브러리 불러오기 형변환 static_cast(값); #정적 자료형 변환. C++에서 기본으로 제공하는 자료형 안에서 형변환을 해준다. dynamic_cast(값); #동적 자료형 변환. 자식 클래스의 포인터/참조에서 부모 클래스의 포인터/참조로 형변환을 해준다. reinterpret_cast(값); #포인터 형태를 바꿔주는데, 어떤 자료형이든 가능하다. 자료형을 막 변환시킬 수 있다. const_cast(값); #const 성향을 없앨 수 있다. PS에서는 static_cast만 기억하면 된다! stoi(string) #문자열을 int로 변환시켜준다. stoi = string to int stof = string to float stol = string to long sto..
https://leetcode.com/problems/number-of-subsequences-that-satisfy-the-given-sum-condition/ Number of Subsequences That Satisfy the Given Sum Condition - LeetCode Can you solve this real interview question? Number of Subsequences That Satisfy the Given Sum Condition - You are given an array of integers nums and an integer target. Return the number of non-empty subsequences of nums such that the s..
https://leetcode.com/problems/maximum-number-of-vowels-in-a-substring-of-given-length/ Maximum Number of Vowels in a Substring of Given Length - LeetCode Can you solve this real interview question? Maximum Number of Vowels in a Substring of Given Length - Given a string s and an integer k, return the maximum number of vowel letters in any substring of s with length k. Vowel letters in English ar..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/dzklqD/btsdWCeAiRj/tlYu7zdtBFrdyJHFewT2Y0/img.png)
https://leetcode.com/problems/dota2-senate/description/ Dota2 Senate - LeetCode Can you solve this real interview question? Dota2 Senate - In the world of Dota2, there are two parties: the Radiant and the Dire. The Dota2 senate consists of senators coming from two parties. Now the Senate wants to decide on a change in the Dota2 game. leetcode.com 문제 유형 : 그리디 / 큐 / 구현 문제 난이도 : Medium 문제 In the wo..
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..
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..