본문 바로가기
  • soldonii's devlog

알고리즘31

자바스크립트 알고리즘(13) - vowels *Udemy의 "The Coding Interview Bootcamp: Algorithms + Data Structures" 강의에서 학습한 내용을 정리한 포스팅입니다. *https://soldonii.github.io에서 작성한 글을 티스토리로 옮겨온 포스팅입니다. *자바스크립트를 배우는 단계라 오류가 있을 수 있습니다. 틀린 내용은 댓글로 말씀해주시면 수정하겠습니다. 감사합니다. :) 지문 // Write a function that returns the number of vowels // used in a string. Vowels are the characters 'a', 'e' // 'i', 'o', and 'u'. // --- Examples // vowels('Hi There!') --> 3.. 2019. 8. 26.
자바스크립트 알고리즘(12) - pyramids *Udemy의 "The Coding Interview Bootcamp: Algorithms + Data Structures" 강의에서 학습한 내용을 정리한 포스팅입니다. *https://soldonii.github.io에서 작성한 글을 티스토리로 옮겨온 포스팅입니다. *자바스크립트를 배우는 단계라 오류가 있을 수 있습니다. 틀린 내용은 댓글로 말씀해주시면 수정하겠습니다. 감사합니다. :) 지문 // Write a function that accepts a positive number N. // The function should console log a pyramid shape // with N levels using the # character. Make sure the // pyramid has sp.. 2019. 8. 26.
자바스크립트 알고리즘(11) - matrix *Udemy의 "The Coding Interview Bootcamp: Algorithms + Data Structures" 강의에서 학습한 내용을 정리한 포스팅입니다. *https://soldonii.github.io에서 작성한 글을 티스토리로 옮겨온 포스팅입니다. *자바스크립트를 배우는 단계라 오류가 있을 수 있습니다. 틀린 내용은 댓글로 말씀해주시면 수정하겠습니다. 감사합니다. :) 지문 // Write a function that accepts an integer N // and returns a NxN spiral matrix. // --- Examples // matrix(2) // [[1, 2], // [4, 3]] // matrix(3) // [[1, 2, 3], // [8, 9, 4], .. 2019. 8. 26.
자바스크립트 알고리즘(10) - fibonacci *Udemy의 "The Coding Interview Bootcamp: Algorithms + Data Structures" 강의에서 학습한 내용을 정리한 포스팅입니다. *https://soldonii.github.io에서 작성한 글을 티스토리로 옮겨온 포스팅입니다. *자바스크립트를 배우는 단계라 오류가 있을 수 있습니다. 틀린 내용은 댓글로 말씀해주시면 수정하겠습니다. 감사합니다. :) 지문 // Print out the n-th entry in the fibonacci series. // The fibonacci series is an ordering of numbers where // each number is the sum of the preceeding two. // For example, th.. 2019. 8. 26.
자바스크립트 알고리즘(9) - steps *Udemy의 "The Coding Interview Bootcamp: Algorithms + Data Structures" 강의에서 학습한 내용을 정리한 포스팅입니다. *https://soldonii.github.io에서 작성한 글을 티스토리로 옮겨온 포스팅입니다. *자바스크립트를 배우는 단계라 오류가 있을 수 있습니다. 틀린 내용은 댓글로 말씀해주시면 수정하겠습니다. 감사합니다. :) 지문 // Write a function that accepts a positive number N. // The function should console log a step shape // with N levels using the # character. Make sure the // step has spaces o.. 2019. 8. 26.
자바스크립트 알고리즘(8) - sentence capitalization *Udemy의 "The Coding Interview Bootcamp: Algorithms + Data Structures" 강의에서 학습한 내용을 정리한 포스팅입니다. *https://soldonii.github.io에서 작성한 글을 티스토리로 옮겨온 포스팅입니다. *자바스크립트를 배우는 단계라 오류가 있을 수 있습니다. 틀린 내용은 댓글로 말씀해주시면 수정하겠습니다. 감사합니다. :) 지문 // Write a function that accepts a string. The function should // capitalize the first letter of each word in the string then // return the capitalized string. // --- Examples .. 2019. 8. 26.
자바스크립트 알고리즘(7) - reverseString *Udemy의 "The Coding Interview Bootcamp: Algorithms + Data Structures" 강의에서 학습한 내용을 정리한 포스팅입니다. *https://soldonii.github.io에서 작성한 글을 티스토리로 옮겨온 포스팅입니다. *자바스크립트를 배우는 단계라 오류가 있을 수 있습니다. 틀린 내용은 댓글로 말씀해주시면 수정하겠습니다. 감사합니다. :) 지문 // Given a string, return a new string with the reversed // order of characters // --- Examples // reverse('apple') === 'leppa' // reverse('hello') === 'olleh' // reverse('Gree.. 2019. 8. 26.
자바스크립트 알고리즘(6) - reverseInt *Udemy의 "The Coding Interview Bootcamp: Algorithms + Data Structures" 강의에서 학습한 내용을 정리한 포스팅입니다. *https://soldonii.github.io에서 작성한 글을 티스토리로 옮겨온 포스팅입니다. *자바스크립트를 배우는 단계라 오류가 있을 수 있습니다. 틀린 내용은 댓글로 말씀해주시면 수정하겠습니다. 감사합니다. :) 지문 // Given an integer, return an integer that is the reverse // ordering of numbers. // --- Examples // reverseInt(15) === 51 // reverseInt(981) === 189 // reverseInt(500) === 5 .. 2019. 8. 26.
자바스크립트 알고리즘(5) - palindrome *Udemy의 "The Coding Interview Bootcamp: Algorithms + Data Structures" 강의에서 학습한 내용을 정리한 포스팅입니다. *https://soldonii.github.io에서 작성한 글을 티스토리로 옮겨온 포스팅입니다. *자바스크립트를 배우는 단계라 오류가 있을 수 있습니다. 틀린 내용은 댓글로 말씀해주시면 수정하겠습니다. 감사합니다. :) 지문 // Given a string, return true if the string is a palindrome // or false if it is not. Palindromes are strings that // form the same word if it is reversed. *Do* include spaces.. 2019. 8. 26.