생각의 표현들

LeetCode

[LeetCode] 219. Contains Duplicate II

Contains Duplicate II - LeetCode Can you solve this real interview question? Contains Duplicate II - Given an integer array nums and an integer k, return true if there are two distinct indices i and j in the array such that nums[i] == nums[j] and abs(i - j)

LeetCode

[LeetCode] 1. Two Sum

Two Sum - LeetCode Can you solve this real interview question? Two Sum - Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each input would have exactly one solution, and you may not leetcode.com int 배열이 주어지고 target이 주어지면 2개의 조합으로 target이 되는 조합을 반환하는 문제입니다. Example 1: Input: nums = [2,7,11,15], target = 9..

LeetCode

[LeetCode] 155. Min Stack

Min Stack - LeetCode Can you solve this real interview question? Min Stack - Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. Implement the MinStack class: * MinStack() initializes the stack object. * void push(int val) pushes t leetcode.com Min값을 O(1)안에 반환하는 Stack을 구현하는 문제입니다. Example 1: ["MinStack","push","push","push","getMin","pop","top","getM..

LeetCode

[LeetCode] 74. Search a 2D Matrix

Search a 2D Matrix - LeetCode Can you solve this real interview question? Search a 2D Matrix - You are given an m x n integer matrix matrix with the following two properties: * Each row is sorted in non-decreasing order. * The first integer of each row is greater than the last integer leetcode.com int형 2차원 배열과 target 숫자가 주어지면 2차원 배열안에 target이 있는지 찾아 true or false를 반환하는 문제입니다. O(log(n*m))의 시간복잡도안..

Sol b
'분류 전체보기' 카테고리의 글 목록 (18 Page)