Skip to main content

Posts

Showing posts from February, 2021

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

FE WebDev Routine Training Feb 18, 2021

JS - Still taking Jonas JS course. (170/313) Too many contents left :( but it is very important to master the basic to move forward. Algorithm - class 1 & other online course  Still weak but this is a crucial thing to master to be a good at PS  Projects - OXINION & DividendKing & RoboTaxi  I really need to find time to do these 3 projects and apply jobs with those 

average - 1546

  https://www.acmicpc.net/problem/1546 my attempt const   input   =   require ( "fs" ). readFileSync ( "/dev/stdin" ). toString (). split ( " \n " ); const   numSub   =   Number ( input [ 0 ]); const   oriGrade   =   input [ 1 ]. split ( " " ); const   m   =   Math . max (... oriGrade ); let   fakeNum   =  []; for  ( let   grade   of   oriGrade ) {    fakeNum . push (( grade   /   m )  *   100 ); } // calcurate the avg const   result   =   fakeNum   /   numSub ; console . log ( result ); others solution  const   input   =   require ( "fs" ). readFileSync ( "/dev/stdin" ). toString (). split ( " \n " ); const   numSub   =   Number ( input [ 0 ]); const   oriGrade   =   input [ 1 ]. split ( " " ). map (( v )  =>   v ); const   m   = ...

Multiplication table - 2739

https://www.acmicpc.net/problem/2739  my attempt function multiplication ( n ) { for ( let i = 1 ; i <= 9 ; i ++ ) { console . log ( ` ${ n } * ${ i } = ${ i * n } ` ); } } multiplication ( 3 ); other  let input = require ( "fs" ) . readFileSync ( "/dev/stdin" ) . toString (); const n = Number ( input [ 0 ]); for ( let i = 1 ; i < 10 ; i ++ ) { console . log ( ` ${ n } * ${ i } = ${ n * i } ` ); }

findMax and the place in the index - 2562

 https://www.acmicpc.net/problem/2562 my attempt   function findMax ( arr ) { const maxResult = Math . max ( ... arr ); console . log ( maxResult ); const el = arr . indexOf ( maxResult ); console . log ( el + 1 ); } findMax ([ 3 , 29 , 38 , 12 , 57 , 74 , 40 , 85 , 61 ]); others  const input = require ( "fs" ) . readFileSync ( "/dev/stdin" ) . toString () . split ( " \n " ); const inputToInt = input . map ( ( num ) => ( num = parseInt ( num ))); let max = 0 ; let idx = 0 ; for ( let i = 0 ; i < inputToInt . length ; i ++ ) { if ( inputToInt [ i ] > max ) { max = inputToInt [ i ]; idx = i + 1 ; } } console . log ( max ); console . log ( idx );

Repeat string - 2675

https://www.acmicpc.net/problem/2675 my attempt  function   stringRepeat ( str ) {    const   ref   =   str . split ( " " );    const   repeat   =   Number ( ref [ 0 ]);  //3    const   strin   =   ref [ 1 ];  //ABC    const   strArr   =   strin . split ( "" );    if  ( strin   ===   "" ) {      console . log ( "nothing" );   }  else  {      const   result   =   strArr . map (( v )  =>   v . repeat ( repeat )). join ( "" );      console . log ( result );   } } stringRepeat ( "5 /HTP" );  // AAABBBCCC Solution 

Print star (1)

  https://www.acmicpc.net/problem/2438 function   writeStar ( n ) {    for  ( let   i   =   1 ;  i   <=   n ;  i   +=   1 ) {      console . log ( "*" . repeat ( i ));   } } writeStar ( 5 );

FE WebDev Routine Training Feb 10, 2021

I keep worrying about my future when i study more and more. I'm not 100% sure that I'm taking the right path to be a software engineer. I found so many great developers on YouTube community and they provide so many useful information. I do live coding streaming everyday when i study and also try to do at least 3 sessions. 1 session is consisted of these(Algorithm/ Vanilla JS/ React). When i have tech interview, they expect me a decent level of algorithm and JS toy project implementation. So i found out that learning React isn't important at this point. Although it isn't important until i build up the foundation, i'd like to be a React developer and would like design whatever i want to.   Coding test - codewar 1   CSS - grid/   JS - Sec 9   React -   A bit of Yelp Portfolio -  List the 100JS projects Job hunting - Karrot for  internship  Apply SW maestro

FE WebDev Routine Training Feb 09, 2021

 FE WebDev Routine Training Feb 09, 2021  A lot of things to do. DO FUCKING FOCUS!!!  Coding test - codewar 1 Kakao 2021 No.1 CSS - grid/ SCSS and Cloning(besthorrorscenes.com) JS - for of loop/  Sec9/ DOM array methods toy project React -   A bit of Yelp Portfolio -  List the 100JS projects Job hunting -  NAVER Finance(on 10th) Karrot for  internship  Apply SW maestro

FE WebDev Routine Training Feb 08, 2021

 A lot of things to do.  Coding test -  Kakao 2021 No.1 CSS - grid/ SCSS and Cloning(besthorrorscenes.com) JS - for of loop/  Sec9/ DOM array methods toy project React -   A bit of Yelp Portfolio -  List the 100JS projects Job hunting -  NAVER Finance(on 10th) Karrot for internship  Apply SW maestro

FE WebDev Routine Training Feb 07, 2021

 I found out that there's a Yelp clone coding tutorial on YouTube. He did such a fantastic job and one day i would like to make clone coding tutorial on my channel too. I don't know his name but thank you so much for creating one.  CSS JS React - Yelp/1 toy (Reviews)  Coding test Portfolio 

Stack and Queue in JavaScript by iDevBrandon

  Enqueue : A method to add  Dequeue : A method to remove  Front : The place where dequeue data Back : The place where enqueue data  Size : A method to figure out the size of queue