Algorithm
leetcode.com/problems/search-insert-position/ Search Insert Position - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 1. Problem 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 ..
1. Problem 각 세션의 시작시간은 StartTime 함수에 들어있고 각 시작시간의 발표시간은 RunningTime에 들어있다. 시간당 한 세션밖에 발표할 수 없다. 주어진 start_time과 running_time에서 발표가능한 최대 세션 횟수를 구하여라. case1) Input : n = 5; start_time : [1,3,3,5,7], running_time: [2,2,1,2,1] Output : 3 case2) Input : n = 3; start_time : [1, 3, 5], running_time: [2 ,2, 2] Output : 3 case3) Input: n = 1; start_time : [1], running_time: [1] Output: 1 주어진 발표리스트에서 가능한 ..
leetcode.com/problems/same-tree/ Same Tree - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 1. Problem Given the roots of two binary trees p and q, write a function to check if they are the same or not. Two binary trees are considered the same if they are structurally identical, a..
leetcode.com/problems/add-binary/submissions/ Add Binary - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 1. Problem Given two binary strings a and b, return their sum as a binary string. Example 1: Input: a = "11", b = "1" Output: "100" Example 2: Input: a = "1010", b = "1011" Ou..
leetcode.com/problems/3sum/ 1. Problem Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero. Notice that the solution set must not contain duplicate triplets. Example 1: Input: nums = [-1,0,1,2,-1,-4] Output: [[-1,-1,2],[-1,0,1]] Example 2: Input: nums = [] Output: [] Example 3: Input: num..
leetcode.com/problems/insert-interval/ Insert Interval - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 1. Problem Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary). You may assume that the intervals were initially sorted accor..
leetcode.com/problems/maximum-subarray/ Maximum Subarray - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 1. Problem Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum. Example 1: Input: nums = [-..
leetcode.com/problems/plus-one/ Plus One - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 1. Problem Given a non-empty array of decimal digits representing a non-negative integer, increment one to the integer. The digits are stored such that the most significant digit is at the he..
leetcode.com/problems/length-of-last-word/ Length of Last Word - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 1. Problem Given a string s consists of some words separated by spaces, return the length of the last word in the string. If the last word does not exist, return 0. A wo..



