일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- security
- npm
- generic
- webpack
- machine learning
- Python
- Clone
- type
- nginx
- JavaScript
- BOJ
- TypeScript
- condition
- C#
- vuetify
- vue.js
- 앙상블
- docker
- AI
- bash
- loop
- VUE
- var
- git
- dotenv
- 보안
- C++
- scss
- leetcode
- property
- Today
- Total
목록PS/LeetCode (49)
ice rabbit programming
6일차 문제는 이전에 풀었던 문제였고, 7일차 문제는 풀지 않았다. 확실히 하루 안 하니 안 풀어도 상관없다는 마음가짐이..ㅠㅠ https://leetcode.com/problems/valid-perfect-square/ Valid Perfect Square - LeetCode Level 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 이번 문제는 정사각형, 즉 주어진 수가 제곱수인지 판별하는 문제였다. 단 기본 제공하는 sqrt와 같은 함수를 사용하면 의미가 없으므로 쓰지 않는다. 루트를..
4일차 문제를 푼 줄 알았는데 착오로 풀지 않고 넘어가버렸다 ㅠㅠ https://leetcode.com/problems/first-unique-character-in-a-string/ First Unique Character in a String - LeetCode Level 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 문자열에서 한 번만 등장하는 최초의 문자를 찾으면 된다. 문자 별 기본은 -1, 2회 이상 등장은 -2, 1회 등장은 index로 한 후에 최소값을 반환하였다. clas..
https://leetcode.com/problems/ransom-note/ Ransom Note - LeetCode Level 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 2번 문제와 비슷했는데, 이번엔 단순 포함이 아닌 문자의 사용 횟수와 관련된 문제였다. 카드 사용 문제와 비슷한 느낌이었다. 각 문자별로 카운트를 하고, 차감하는 식으로 구현하였다. class Solution { public: bool canConstruct(string ransomNote, string magazi..
https://leetcode.com/problems/delete-duplicate-emails/ Delete Duplicate Emails - LeetCode Level 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 중복 email을 제거하는 문제이다. 처음에는 SELECT에서 중복을 없애고 조회하는 쿼리를 짰었는데, 이상해서 다시 살펴보니 DELETE 쿼리를 날려야 하는 문제였다... DELETE b FROM Person a, Person b WHERE a.Email = b.Email..
https://leetcode.com/problems/jewels-and-stones/ Jewels and Stones - LeetCode Level 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 2일차 May Challenge 문제였는데, S에 속한 문자 중 J에 속한 것이 몇 개인지 구하는 문제였다. 단순한 선형 탐색을 통해 구현하였다. 다른 풀이로 string의 contains 메소드를 사용하였는데, 시간 차이는 4ms로 많이 나지 않았다. 아마 Contains 메소드가 O(nk)로..
https://leetcode.com/problems/second-highest-salary/ Second Highest Salary - LeetCode Level 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 두 번째로 큰 값을 찾는 문제였다. MAX 값보다 작은 값들 중에 MAX를 Select하였다. # Write your MySQL query statement below SELECT MAX(Salary) as SecondHighestSalary FROM Employee WHERE S..
https://leetcode.com/explore/featured/card/may-leetcoding-challenge/534/week-1-may-1st-may-7th/3316/ 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 4월에 게을러서 하지 않았던 1일 1문제 챌린지를 5월에는 해보려고 한다. 요즘에 계속 하루에 한 두 문제씩 풀었어서.. 첫 ..
https://leetcode.com/problems/employees-earning-more-than-their-managers/ Employees Earning More Than Their Managers - LeetCode Level 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 아마 관계형 DB를 배울 때 가장 유명한 예제가 아닐까? Employee의 Manager가 Employee에 속하는 것. 그 중에서 Salary를 비교하여 출력하는 예제였다. # Write your MySQ..