본문 바로가기
  • soldonii's devlog

알고리즘31

자바스크립트 알고리즘(4) - maxChar *Udemy의 "The Coding Interview Bootcamp: Algorithms + Data Structures" 강의에서 학습한 내용을 정리한 포스팅입니다. *https://soldonii.github.io에서 작성한 글을 티스토리로 옮겨온 포스팅입니다. *자바스크립트를 배우는 단계라 오류가 있을 수 있습니다. 틀린 내용은 댓글로 말씀해주시면 수정하겠습니다. 감사합니다. :) 지문 // Given a string, return the character that is most // commonly used in the string. // --- Examples // maxChar("abcccccccd") === "c" // maxChar("apple 1231111") === "1" 1번 풀이 .. 2019. 8. 26.
자바스크립트 알고리즘(3) - fizzbuzz *Udemy의 "The Coding Interview Bootcamp: Algorithms + Data Structures" 강의에서 학습한 내용을 정리한 포스팅입니다. *https://soldonii.github.io에서 작성한 글을 티스토리로 옮겨온 포스팅입니다. *자바스크립트를 배우는 단계라 오류가 있을 수 있습니다. 틀린 내용은 댓글로 말씀해주시면 수정하겠습니다. 감사합니다. :) 지문 // Write a program that console logs the numbers // from 1 to n. But for multiples of three print // “fizz” instead of the number and for the multiples // of five print “buzz”... 2019. 8. 26.
자바스크립트 알고리즘(2) - chunk *Udemy의 "The Coding Interview Bootcamp: Algorithms + Data Structures" 강의에서 학습한 내용을 정리한 포스팅입니다. *https://soldonii.github.io에서 작성한 글을 티스토리로 옮겨온 포스팅입니다. *자바스크립트를 배우는 단계라 오류가 있을 수 있습니다. 틀린 내용은 댓글로 말씀해주시면 수정하겠습니다. 감사합니다. :) 지문 // Given an array and chunk size, divide the array into many subarrays // where each subarray is of length size // --- Examples // chunk([1, 2, 3, 4], 2) --> [[ 1, 2], [3, 4]] .. 2019. 8. 26.
자바스크립트 알고리즘(1) - anagram *Udemy의 "The Coding Interview Bootcamp: Algorithms + Data Structures" 강의에서 학습한 내용을 정리한 포스팅입니다. *https://soldonii.github.io에서 작성한 글을 티스토리로 옮겨온 포스팅입니다. *자바스크립트를 배우는 단계라 오류가 있을 수 있습니다. 틀린 내용은 댓글로 말씀해주시면 수정하겠습니다. 감사합니다. :) 지문 / Check to see if two provided strings are anagrams of eachother. // One string is an anagram of another if it uses the same characters // in the same quantity. Only consider c.. 2019. 8. 26.