알고리즘풀이2 [leetcode/JS] 28. Implement strStr() /Javascript 문제 링크 https://leetcode.com/problems/implement-strstr/ Implement strStr() - 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 투포인터를 사용 해 풀었습니다 기억하면 좋을 것 / 소감 indexOf()를 쓰는게 속도 빠르니까 그렇게 하자 indexOf() 짚고 넘어가기 indexOf() 메서드는 배열에서 지정된 요소를 찾을 수 있는 첫 번째 인덱스를 반환하고 존재하지 않으면 -1을 반환합니다. https://.. 2022. 5. 12. [leetcode] 20. Valid Parentheses / JS Javascript 코드 , 풀이 문제 제목 Valid Parentheses 문제 링크 https://leetcode.com/problems/valid-parentheses/ Valid Parentheses - 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 코드 /** * @param {string} s * @return {boolean} */ var isValid = function(s) { let A = [s[s.length-1]]; for (let i =s.length-2; i>=0; i-.. 2022. 4. 6. 이전 1 다음