| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | 31 |
- 리눅스
- 이터레이터
- 자료구조와함께배우는알고리즘입문
- ㅒ
- resttemplate
- baeldung
- 코드로배우는스프링부트웹프로젝트
- 스프링부트핵심가이드
- network configuration
- 자바편
- d
- 처음 만나는 AI수학 with Python
- GIT
- iterator
- 목록처리
- 코드로배우는스프링웹프로젝트
- 페이징
- Kernighan의 C언어 프로그래밍
- 자료구조와 함께 배우는 알고리즘 입문
- 네트워크 설정
- 데비안
- 친절한SQL튜닝
- 스프링 시큐리티
- 선형대수
- 알파회계
- 서버설정
- 구멍가게코딩단
- /etc/network/interfaces
- 티스토리 쿠키 삭제
- 처음 만나는 AI 수학 with Python
- Today
- Total
목록Algorithm Practice (11)
bright jazz music
https://school.programmers.co.kr/learn/courses/30/lessons/42576?language=javascript 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr 문제 설명수많은 마라톤 선수들이 마라톤에 참여하였습니다. 단 한 명의 선수를 제외하고는 모든 선수가 마라톤을 완주하였습니다.마라톤에 참여한 선수들의 이름이 담긴 배열 participant와 완주한 선수들의 이름이 담긴 배열 completion이 주어질 때, 완주하지 못한 선수의 이름을 return 하도록 solution 함수를 작성해주세요.제한사항마라톤 경기에 참여한 선수의 수는 1명 이상 100,000명 이하입니다...
function increasingTriplet(nums: number[]): boolean { // first: 지금까지 본 가장 작은 값 // second: first보다 크면서 가장 작은 값 let first = Infinity; let second = Infinity; for(let num of nums) { if(num second > first // triplet 완성! return true; } } return false;}// 잘못된 접근// function increasingTriplet(nums: number[]): boolean {// // 각 인덱스를 ..
// 나의 접근 방법. O(n2)function productExceptSelf(nums: number[]): number[] { let answerArr: number[] = [] for(let i = 0; i = 0; j--) { // ← >= 0으로 수정 answer *= nums[j] } answerArr.push(answer); } else { // ← 중간 요소들 처리 추가 필요 let answer = 1; // 왼쪽 곱 for(let j = 0; j Given an integer array nums, return an array answer ..
https://leetcode.com/problems/reverse-words-in-a-string/?envType=study-plan-v2&envId=leetcode-75function reverseWords(s: string): string { // 먼저 트림하고 let trimedWords = s.trim(); // ' ' 를 기준으로 split한 뒤에 // pop 해서 스트링에 붙여서 반환 // let splitWordsArr = trimedWords.split(' '); // 위처럼만 하면 ' ' 이런 경우 공백이 붙어버리기 때문에 // filter(w => w !== '') 이걸 써서 공백을 없애버려야 한다. let splitWordsArr = ..
function reverseVowels(s:string): string { // const vowels = ['a','e','i','o','u','A','E','I','O','U']; const vowels = new Set(['a','e','i','o','u','A','E','I','O','U']); let arr = s.split(''); let left = 0; let right = arr.length -1; while( left 투 포인터로 푸는 게 나은 문제였다. 나는 원래 아래와 같이 풀려고 했다. function reverseVowels(s: string): string { const vowels = ['a','e','i','o','u','A','E..
605. Can Place FlowersSolvedEasyTopicsconpanies iconCompaniesYou have a long flowerbed in which some of the plots are planted, and some are not. However, flowers cannot be planted in adjacent plots.Given an integer array flowerbed containing 0's and 1's, where 0 means empty and 1 means not empty, and an integer n, return true if n new flowers can be planted in the flowerbed without violating the..
Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.You may assume that each input would have exactly one solution, and you may not use the same element twice.You can return the answer in any order. Example 1:Input: nums = [2,7,11,15], target = 9Output: [0,1]Explanation: Because nums[0] + nums[1] == 9, we return [0, 1].Example ..
SQL SchemaTable: Customers+-------------+---------+| Column Name | Type |+-------------+---------+| id | int || name | varchar |+-------------+---------+id is the primary key column for this table.Each row of this table indicates the ID and name of a customer. Table: Orders+-------------+------+| Column Name | Type |+-------------+------+| id | int || customerId ..
SQL SchemaTable: Customer+-------------+---------+| Column Name | Type |+-------------+---------+| id | int || name | varchar || referee_id | int |+-------------+---------+id is the primary key column for this table.Each row of this table indicates the id of a customer, their name, and the id of the customer who referred them. Write an SQL query to report the names of..
SQL SchemaTable: Products+-------------+---------+| Column Name | Type |+-------------+---------+| product_id | int || low_fats | enum || recyclable | enum |+-------------+---------+product_id is the primary key for this table.low_fats is an ENUM of type ('Y', 'N') where 'Y' means this product is low fat and 'N' means it is not.recyclable is an ENUM of types ('Y', 'N') where 'Y..
