HakerRank - Day 5 Template Literals

2019-10-05

Problem https://www.hackerrank.com/challenges/js10-template-literals/problem My solution Tagged Template 해당 문제는 에 대한 이해가 있어야 풀 수 있다. 아래에 그에 대한 설명이 담긴 링크를 첨부하였다. https://developer.mozilla.org/en-US/d…


HakerRank - Day 7 Regular Expressions I

2019-10-05

Problem https://www.hackerrank.com/challenges/js10-regexp-1/problem My solution 역참조(backreferences) 정규 표현식에서는 패턴의 일부를 하위 표현식으로 묶으면, 첫번째로 나타나는 부분 문자열을 찾은 뒤에 역참조를 통해 이후에 나타나는 부분 문자열을 찾을 수 있다. 이때, 각 하위 …


HakerRank - Mini Max Sum

2019-05-20

Problem 링크 image What I Learned 단축 평가(short circuit) is logically and behaves like multiplication (eg. ) is logically and behaves like addition (eg. ) 연산자 우선순위, JavaScript Operator Precedence (Or…


HakerRank - StairCase

2019-05-20

문제 링크 image 배운것 "str".repeat() 함수 - 특정 문자를 반복해주는 함수 Array(n).fill(arg) - 특정 arg 를 n 번 채워서 가지고 있는 배열 반환 풀이


CodeSignal - Arcade - BoxBlur

2019-05-11

Problem image image Python solution 파이썬의 슬라이싱 기법 파이선 list comprehension 중첩 풀어서 써보기 파이썬의 sum 함수는 리스트 자료형을 넣으주면 리스트 자료형 내부 요소들을 모두 더해서 출력해줌 My solution Solution Python Solution What I learned JS #1 im…


CodeSignal - Arcade - avoidObstacles

2019-04-30

Problem image What I learned 논리평가에서 이 0 이면 자동으로 false 가 나오게 된다. 굳이 으로 점검하지 않아도 된다. 표현 inputArray를 돌면서 배열의 각 요소를 c로 나눈 나머지를 다시 배열로 리턴함 리턴한 배열을 sorting 함 sorting 한 배열의 첫번째 값 즉 가장 작은 값이 0 보다 클 경우 -…


CodeSignal - Arcade - isIPv4Address

2019-04-27

Problem image image What I learned input 조건을 제대로 살펴볼 것, input 에 숫자가 아닌 lowercase 알파벳이 들어온다. 반례에 대해 진지하게 생각해볼 것 파이썬 all 함수 자바스크립트 every 함수와 유사함 파이썬 isdigit 함수 파이썬 len 함수 자바스크립트 every 함수 활용 My solution…


CodeSignal - Arcade - Array Maximal Adjacent Difference

2019-04-24

Problem image What I learned 맨앞의 배열을 자른 배열과 원본 배열을 똑같은 인덱스로 비교하면 인접한 요소간의 차이를 알 수 있음 의 0번 인덱스와 의 0번 인덱스를 빼면 차이를 알 수 있음 Math.max(...arr) 표현 파이썬 list comprehension 표현 파이썬 함수는 자체를 인자로 받을 수 있음(자바스크립…


CodeSignal - Arcade - areEquallystrong

2019-04-20

Problem image What I learned 연산자 우선순위 sorting 먼저하는 로직 python 집합으로 비교하는 로직 My solution Solution Python Solution


CodeSignal - Arcade - palindromeRearranging

2019-04-15

Problem image What I learned 들어있는 각 요소의 개별 등장 횟수를 세고 그 횟수를 2로 나눈 나머지의 합이 1 또는 1 이하일때 에만 회문으로 변경가능하다. new Set 함수 sort 함수 와 정규식 역참조 그리고 replace 함수를 이용한 풀이 파이썬 count 함수 My solution Solution Python Solut…


CodeSignal - Arcade - Array Change

2019-04-11

Problem image image What I learned 시퀀스를 만들기 위해서는 이전 인덱스의 값과 현재 인덱스 값의 차이에 대한 합이 필요 My solution Solution Python Solution


CodeSignal - Arcade - 24MineSweeper

2019-04-11

Problem image image My solution Solution Python Solution What I learned JS 함수 중첩으로 row, colum 지정 가능 bitwise 연산자로 0을 반환 보통 y축 (row) undefined 여부를 검사 후 x축 좌표를 통해 지뢰를 확인함 는 1 혹은 0을 반환 double ban…


CodeSignal - Arcade - Arr Similar

2019-04-07

Problem image What I learned swap을 충족하기 위해서는 두 배열간의 다른 부분이 2개 여야 하고 그 부분의 위치를 바꿨을 때 같아져야 한다. filter 함수와 배열의 length 를 통해 값 표현하기 python의 counter 와, zip 함수 My solution Solution Python Solution


CodeSignal - Arcade - Add Border

2019-04-03

Problem image What I learned destructing 을 쓸 수 있을 때는 최대한 활용하도록 하자 map을 적용한 뒤에 destruction을 사용할 수 있다. python list comprehension python center method My solution Solution Python Solution


CodeSignal - Arcade - reverseInParentheses

2019-04-02

Problem image What I learned 나머지의 값이 리턴해야하는 배열과 동일한 것을 이용하여 reduce 함수로 처리하는 방식 파이썬의 list 조회방식 `sum(a[::2]),sum(a[1::2] My solution Solution Python solution


CodeSignal - Arcade - reverseInParentheses

2019-04-01

Problem image What I learned indexOf("str or num", "start index") 해당 함수의 두번째 인자의 활용방안 lastIndexOf 의 활용방안 substirng() substing 대신 slice()를 쓰는 로직 My solution Solution