LeetCode: 35. Search Insert Position
https://leetcode.com/problems/search-insert-position/description/ 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 write an algorithm with O(log n) runtime complexity. Example 1:Input: nums = [1,3,5,6], target = 5Output: 2Example 2:Input: nums = [1,3,5,6], target..
2025. 8. 11.
프로그래머스: 2019 카카오 개발자 겨울 인턴십 - 튜플
https://school.programmers.co.kr/learn/courses/30/lessons/64065?language=swift 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr 문제 설명셀수있는 수량의 순서있는 열거 또는 어떤 순서를 따르는 요소들의 모음을 튜플(tuple)이라고 합니다. n개의 요소를 가진 튜플을 n-튜플(n-tuple)이라고 하며, 다음과 같이 표현할 수 있습니다.(a1, a2, a3, ..., an)튜플은 다음과 같은 성질을 가지고 있습니다.중복된 원소가 있을 수 있습니다. ex : (2, 3, 1, 2)원소에 정해진 순서가 있으며, 원소의 순서가 다르면 서로 다른 튜플입니다. ..
2025. 8. 5.
프로그래머스: 최댓값 만들기(1)
https://school.programmers.co.kr/learn/courses/30/lessons/120847 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr 문제 설명정수 배열 numbers가 매개변수로 주어집니다. numbers의 원소 중 두 개를 곱해 만들 수 있는 최댓값을 return하도록 solution 함수를 완성해주세요.제한사항0 ≤ numbers의 원소 ≤ 10,0002 ≤ numbers의 길이 ≤ 100입출력 예numbers result[1, 2, 3, 4, 5] 20[0, 31, 24, 10, 1, 9] 744입출력 ..
2025. 8. 2.