목록PS (814)
넘치게 채우기
https://leetcode.com/problems/count-ways-to-build-good-strings/ Count Ways To Build Good Strings - LeetCode Can you solve this real interview question? Count Ways To Build Good Strings - Given the integers zero, one, low, and high, we can construct a string by starting with an empty string, and then at each step perform either of the following: * Append the char leetcode.com 문제 유형 : 다이나믹 프로그래밍 문..
https://leetcode.com/problems/solving-questions-with-brainpower/ Solving Questions With Brainpower - LeetCode Can you solve this real interview question? Solving Questions With Brainpower - You are given a 0-indexed 2D integer array questions where questions[i] = [pointsi, brainpoweri]. The array describes the questions of an exam, where you have to process the qu leetcode.com 문제 유형 : 다이나믹 프로그래밍..
https://leetcode.com/problems/uncrossed-lines/ Uncrossed Lines - LeetCode Can you solve this real interview question? Uncrossed Lines - You are given two integer arrays nums1 and nums2. We write the integers of nums1 and nums2 (in the order they are given) on two separate horizontal lines. We may draw connecting lines: a straigh leetcode.com 문제 유형 : 다이나믹 프로그래밍 문제 난이도 : Medium 문제 You are given tw..
https://leetcode.com/problems/spiral-matrix-ii/description/ Spiral Matrix II - LeetCode Can you solve this real interview question? Spiral Matrix II - Given a positive integer n, generate an n x n matrix filled with elements from 1 to n2 in spiral order. Example 1: [https://assets.leetcode.com/uploads/2020/11/13/spiraln.jpg] Input: n = 3 O leetcode.com 문제 유형 : 나선형 행렬 문제 난이도 : Medium 문제 Given a p..
https://leetcode.com/problems/median-of-two-sorted-arrays/description/ Median of Two Sorted Arrays - LeetCode Can you solve this real interview question? Median of Two Sorted Arrays - Given two sorted arrays nums1 and nums2 of size m and n respectively, return the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)). Example 1 leetcode.com 문제 유형 : 정렬 문제 난이도 : H..
https://leetcode.com/problems/spiral-matrix/description/ Spiral Matrix - LeetCode Can you solve this real interview question? Spiral Matrix - Given an m x n matrix, return all elements of the matrix in spiral order. Example 1: [https://assets.leetcode.com/uploads/2020/11/13/spiral1.jpg] Input: matrix = [[1,2,3],[4,5,6],[7,8,9]] Outpu leetcode.com 문제 유형 : 나선형 매트릭스 난이도 : Medium 문제 Given an m x n m..
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..