/**
 * @param {string} haystack
 * @param {string} needle
 * @return {number}
 */
let strStr = function(haystack, needle) {
  return haystack.indexOf(needle)
};

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

 

 

'알고리즘 문제' 카테고리의 다른 글

[백준] 두 수의 합  (0) 2021.02.01
[백준] 정열적인 정렬  (0) 2021.02.01
[백준] 수 정렬하기4  (0) 2021.02.01
[백준] 카드  (0) 2021.02.01
[백준] 배열 합치기  (0) 2021.02.01

+ Recent posts