JavaScript2 [리트코드LeetCode][Easy][JAVA][JavaScript]14. Longest Common Prefix 문제Write a function to find the longest common prefix string amongst an array of strings.If there is no common prefix, return an empty string "". Example 1:Input: strs = ["flower","flow","flight"]Output: "fl"Example 2:Input: strs = ["dog","racecar","car"]Output: ""Explanation: There is no common prefix among the input strings. Constraints:1 0 strs[i] consists of only lowercase English letters. .. 2024. 9. 14. [리트코드LeetCode][Easy][JAVA][JavaScript]1. Two Sum 문제에 앞서 사설.Easy부터 풀어야하나 그래도 내가 프로그래머스 1레벨은 마스터를 한 사람인데, 라고 잠시 고민했지만 건방떨지 말고 차근차근 풀어가기로 함. 쉬우면 문제를 여러 개 풀면 되는데, 그렇게 건실하게 할 수 있는지는 잘 모르겠다. 파이팅. (아니 이번에 자바스크립트를 같이 풀면서 알았는데 한 글에서 코드블럭의 언어설정이 하나로만 지정되는구나 정말 신경쓰이는군) 문제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, .. 2024. 9. 7. 이전 1 다음