Skip to main content

Posts

Frequency Counter example

function   validAnagram ( str1 ,  str2 ) {    // add whatever parameters you deem necessary - good luck!    if  ( str1 . length   !==   str2 . length ) {      return   false ;   }    const   lookup   =  {};    for  ( let   i   =   0 ;  i   <   str1 . length ;  i ++ ) {      let   letter   =   str1 [ i ];      lookup [ letter ]  ?  ( lookup [ letter ]  +=   1 )  :  ( lookup [ letter ]  =   1 );   }    console . log ( lookup );    for  ( let   j   =   0 ;  j   <   str2 . length ;  j ++ ) {      let   letter   =   str2 [ j ];      if  ( ! lookup [...

3052 - Rest JS

https://www.acmicpc.net/problem/3052   My attempt const input = require ( 'fs' ) . readFileSync ( '/dev/stdin' ) . toString () . split ( ' \n ' ); const arr = [ 39 , 40 , 41 , 42 , 43 , 44 , 82 , 83 , 84 , 85 ]; const newArr = []; for ( let i = 0 ; i < input . length ; i ++ ) { const rest = ( Number ( input [ i ]) % 42 ); newArr . push ( rest ) } let set1 = new Set ( newArr ); console . log ( set1 . size ); This site might not accept Set syntax yet.  Others  const input = require ( "fs" ) . readFileSync ( "/dev/stdin" ) . toString () . split ( " \n " ); const userNum = []; input . forEach ( ( x ) => { const num = x % 42 ; if ( userNum . indexOf ( num ) === - 1 ) { userNum . push ( num ); } }); console . log ( userNum . length );

FE WebDev Routine Training Feb 22, 2021

HTML CSS JS Jonas course (191/313) Intersection observer API + OOP React  Interview(CS knowledge) https://yangshun.github.io/front-end-interview-handbook/kr/javascript-questions https://mber.tistory.com/2 https://sunnykim91.tistory.com/121 Coding Test https://solved.ac/class https://edu.goorm.io/learn/lecture/554/%EC%95%8C%EA%B3%A0%EB%A6%AC%EC%A6%98-%EB%AC%B8%EC%A0%9C%ED%95%B4%EA%B2%B0%EA%B8%B0%EB%B2%95-%EC%9E%85%EB%AC%B8 Projects  https://www.oxinion.com

FE WebDev Routine Training Feb 20, 2021

 I'm still not good enough to be a software engineer  HTML CSS JS Jonas course (191/313) React  Interview https://yangshun.github.io/front-end-interview-handbook/kr/javascript-questions https://mber.tistory.com/2 https://sunnykim91.tistory.com/121 https://joshua1988.github.io/web-development/javascript/javascript-interview-3questions/ Coding Test https://solved.ac/class https://edu.goorm.io/learn/lecture/554/%EC%95%8C%EA%B3%A0%EB%A6%AC%EC%A6%98-%EB%AC%B8%EC%A0%9C%ED%95%B4%EA%B2%B0%EA%B8%B0%EB%B2%95-%EC%9E%85%EB%AC%B8 Projects  https://www.oxinion.com