| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
- iterator
- Kernighan의 C언어 프로그래밍
- 데비안
- 친절한SQL튜닝
- /etc/network/interfaces
- 서버설정
- 페이징
- 목록처리
- 자료구조와 함께 배우는 알고리즘 입문
- 선형대수
- 처음 만나는 AI 수학 with Python
- 티스토리 쿠키 삭제
- 스프링 시큐리티
- 네트워크 설정
- 처음 만나는 AI수학 with Python
- 리눅스
- 알파회계
- 자바편
- 코드로배우는스프링웹프로젝트
- d
- 코드로배우는스프링부트웹프로젝트
- 이터레이터
- 스프링부트핵심가이드
- baeldung
- 구멍가게코딩단
- network configuration
- GIT
- 자료구조와함께배우는알고리즘입문
- resttemplate
- ㅒ
- Today
- Total
목록Algorithm Practice/LeetCode (10)
bright jazz music
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..
https://leetcode.com/problems/big-countries/ Big Countries - LeetCodeLevel up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.leetcode.com+-------------+---------+| Column Name | Type |+-------------+---------+| name | varchar || continent | varchar || area | int || population | int ||..
