전체 글539 [Programmers] (월간 코드 챌린지 시즌3) Lv 2. n^2 배열 자르기 https://school.programmers.co.kr/learn/courses/30/lessons/87390 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr function solution(n, left, right) { return Array.from({ length: right - left + 1 }, (undefined, idx) => { idx += left; return Math.max(parseInt(idx / n) + 1, idx % n + 1); }); } GitHub : https://github.com/developeSHG/Algor.. 2023. 2. 10. [Git & GitHub] Chapter 01. Git이란 Git 이란? 형상관리도구(Configuration Management Tool) 중 하나이다 형상관리도구는 다른말로 버전 관리 시스템이라고도 한다. Git은 프로젝트 소스코드를 효과적으로 관리할 수 있는 시스템이다. 효과적 관리란? 여러 명이 동시에 작업하더라도 문제 없도록 한다. 스프트웨어의 여러 버전을 동시에 관리할 수 있다. 프로젝트 진행의 모든 로그를 볼 수 있으며, 해당 시점으로 되돌리는 것도 가능하다. 효과적 관리란? 프로젝트 시, 어떤 기능을 빼고 더하고 고치고 수정하는 과정은 필수! 기능을 되돌리게 될 수도 있고, 서로 다른 기능의 버전을 유지해야 하는 경우도 있다. Git을 사용하는 이유 코드 관리 측면 변경된 이력 확인 이전 이력으로 되돌리기 다른 기능의 버전 코드 유지 현재 최종이 .. 2023. 2. 9. [Programmers] (2019 카카오 개발자 겨울 인턴십) Lv 2. 튜플 https://school.programmers.co.kr/learn/courses/30/lessons/64065 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr function solution(s) { s = s.replace(/{/g, "").replace(/},/g, " ").replace(/}/g, "").split(" ").sort((a, b) => a.length - b.length); return s.reduce((acc, el) => { el = el.split(","); if (acc.length < el.length) { acc.forEa.. 2023. 2. 9. [JavaScript] Chapter 36. 고차 함수와 콜백(Callback) – 일급 객체란 함수는 일급 객체이다. 자바스크립트에는 특별한 대우를 받는 일급 객체가 있다. 대표적인 일급 객체 중 하나가 바로 함수이다. 다음 조건을 만족하는 객체를 일급 객체라고 한다. 무명의 리터럴로 생성할 수 있다. (런타임 생성이 가능하다.) 런타임(할당 단계)에 함수 리터럴이 평가되어 함수 객체가 생성되고 변수에 할당된다. 변수나 자료구조(배열의 요소나 객체의 속성값)에 할당 할 수 있다. 다른 함수의 인자로 전달될 수 있다. 다른 함수의 결과로서 리턴될 수 있다. 자바스크립트 함수는 다음 위 조건을 모두 만족하므로 일급 객체이다. 함수는 객체이다. 함수가 일급 객체라는 것은 함수를 객체와 동일하게 사용할 수 있다는 의미이다. 함수는 객체이다. 함수를 객체처럼 사용할 수 있다. 변수, 배열 요소, 객체 값에.. 2023. 2. 7. [Programmers] (해시) Lv 2. 의상 https://school.programmers.co.kr/learn/courses/30/lessons/42578 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr function solution(clothes) { var answer = 1; const map = new Map(); clothes.forEach((pair) => map.set(pair[1], map.get(pair[1]) ? map.get(pair[1]) + 1 : 1)); for (const [key, value] of map.entries()) answer *= (value + 1); .. 2023. 2. 7. [Programmers] Lv 2. 행렬의 곱셈 https://school.programmers.co.kr/learn/courses/30/lessons/12949 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr function solution(arr1, arr2) { return arr1.map((row) => { return arr2[0].map((_, col) => { return row.reduce((acc, e, idx) => acc + e * arr2[idx][col], 0); }); }); } GitHub : https://github.com/developeSHG/Algorithm-Baekjo.. 2023. 2. 7. [LeetCode] (Strings) Lv Easy. First Unique Character in a String https://leetcode.com/explore/interview/card/top-interview-questions-easy/127/strings/881/ Explore - LeetCode LeetCode Explore is the best place for everyone to start practicing and learning on LeetCode. No matter if you are a beginner or a master, there are always new topics waiting for you to explore. leetcode.com /** * @param {string} s * @return {number} */ var firstUniqChar = function (s) { .. 2023. 2. 6. [LeetCode] (Array) Lv Easy. Contains Duplicate https://leetcode.com/explore/interview/card/top-interview-questions-easy/92/array/578/ Explore - LeetCode LeetCode Explore is the best place for everyone to start practicing and learning on LeetCode. No matter if you are a beginner or a master, there are always new topics waiting for you to explore. leetcode.com /** * @param {number[]} nums * @return {boolean} */ var containsDuplicate = function.. 2023. 2. 6. [Programmers] (월간 코드 챌린지 시즌2) Lv 2. 괄호 회전하기 https://school.programmers.co.kr/learn/courses/30/lessons/76502 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr const solution = (s) => { const obj = { "[": "]", "(": ")", "{": "}", }; return [...s].reduce((acc, el, idx) => { const stack = []; for (let i = 0; i < s.length; ++i) { const a = (idx + i) % s.length; if (Object.keys(obj).f.. 2023. 2. 6. [Programmers] (2018 KAKAO BLIND RECRUITMENT) Lv 2. [1차] 캐시 https://school.programmers.co.kr/learn/courses/30/lessons/17680 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr function solution(cacheSize, cities) { const queue = []; let runTime = 0; cities.forEach(data => { data = data.toLowerCase(); if (queue.includes(data)) { queue.splice(queue.findIndex((e) => e === data), 1); runTime++; } els.. 2023. 2. 4. 이전 1 ··· 39 40 41 42 43 44 45 ··· 54 다음