PS/LeetCode (4) 썸네일형 리스트형 [C++] LeetCode (릿코드) 977 : Squares of a Sorted Array 문제 Loading... (leetcode.com) Squares of a Sorted Array - LeetCode Can you solve this real interview question? Squares of a Sorted Array - Given an integer array nums sorted in non-decreasing order, return an array of the squares of each number sorted in non-decreasing order. Example 1: Input: nums = [-4,-1,0,3,10] Out leetcode.com 코드 class Solution { public: vector sortedSquares(vector &nums) { .. [C++] LeetCode (릿코드) 35 : Search Insert Position 문제 Loading Question... - LeetCode Search Insert Position - LeetCode Can you solve this real interview question? Search Insert Position - Given a sorted array of distinct integers and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order. You must w leetcode.com 코드 class Solution { public: int searchInsert(vector &nums, in.. [C++] LeetCode (릿코드) 278 : First Bad Version 문제 First Bad Version - LeetCode First Bad Version - LeetCode Can you solve this real interview question? First Bad Version - You are a product manager and currently leading a team to develop a new product. Unfortunately, the latest version of your product fails the quality check. Since each version is developed base leetcode.com 코드 class Solution { public: int search(vector &nums, int target) { .. [C++] LeetCode (릿코드) 704 : Binary Search 문제 Binary Search - LeetCode Binary Search - LeetCode Can you solve this real interview question? Binary Search - Given an array of integers nums which is sorted in ascending order, and an integer target, write a function to search target in nums. If target exists, then return its index. Otherwise, return -1. leetcode.com 코드 class Solution { public: int search(vector &nums, int target) { int lo =.. 이전 1 다음