profile
덕질기록용

1679. Max number of K-sum pairs

you are given an integer array nums and an integer k.In one operation, you can pick two numbers from the array whose sum equals k and remove them from

2024년 11월 26일
·
0개의 댓글
·
post-thumbnail

11. container with most water

You are given an integer array height of length n. There are n vertical lines drawn such that the two endpoints of the ith line are (i, 0) and (i, hei

2024년 11월 26일
·
0개의 댓글
·

392. Is Subsequence

Given two strings s and t, return true if s is a subsequence of t, or false otherwise. A subsequence of a string is a new string that is formed from

2024년 11월 24일
·
0개의 댓글
·

283. Move Zeroes

Given an integer array nums, move all 0's to the end of it while maintaining the relative order of the non-zero elements.Note that you must do this in

2024년 11월 21일
·
0개의 댓글
·

443. string compression

Given an array of characters chars, compress it using the following algorithm:Begin with an empty string s. For each group of consecutive repeating ch

2024년 11월 16일
·
0개의 댓글
·

334. Increasing Triplet Subsequence

Given an integer array nums, return true if there exists a triple of indices (i, j, k) such that i < j < k and numsi < numsj < numsk. If n

2024년 11월 6일
·
0개의 댓글
·

passes vs. pointers

"passes" and "pointers" represent two different approaches to solving problems, particularly when working with arrays or lists.A pass refers to going

2024년 11월 1일
·
0개의 댓글
·

238. Product of Array Except Self

Given an integer array nums, return an array answer such that answeri is equal to the product of all the elements of nums except numsi.The product of

2024년 11월 1일
·
0개의 댓글
·

151. Reverse Words in a String

Given an input string s, reverse the order of the words.A word is defined as a sequence of non-space characters. The words in s will be separated by a

2024년 11월 1일
·
0개의 댓글
·

345. Reverse Vowels of a String

Given a string s, reverse only all the vowels in the string and return it.The vowels are 'a', 'e', 'i', 'o', and 'u', and they can appear in both lowe

2024년 10월 30일
·
0개의 댓글
·

605. Can Place Flowers

You 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 inte

2024년 10월 27일
·
0개의 댓글
·

1413. Kids with the greatest number of candies

There are n kids with candies. You are given an integer array candies, where each candies\[i] represents the number of candies the $$i^{th}$$ kid has,

2024년 10월 27일
·
0개의 댓글
·

1708. Merge Strings Alternately

You are given two strings word1 and word2. Merge the strings by adding letters in alternating order, starting with word1. If a string is longer than t

2024년 9월 19일
·
0개의 댓글
·

05_Longest_Palindromic_Substring (작성중)

Given a string s, return the longest palindromic substring in s. 역시나 못 풀었던 문제였다. 로직은 짰는데 사실상 brute-force식이었는데 그마저도 어떻게 구현해야할지 감이 도저히 안 와서 좌절했었는데, 원체

2024년 7월 1일
·
0개의 댓글
·

sort() vs. sorted()

이름도 비슷하고 기능도 비슷해서 헷갈리는 함수인 sort()와 sorted(). 공통점과 차이점은 다음과 같다. 그리고 매우 정리가 잘 된 포스트가 있으니 이거 먼저 보는 게 좋을 듯. 아래 내용은 그걸 위주로 해서 내 식대로 정리한 것.공통점1) 리스트를 정렬한다.2

2024년 6월 29일
·
0개의 댓글
·

04_group_anagrams

Given an array of strings strs, group the anagrams together. You can return the answer in any order.An Anagram is a word or phrase formed by rearrangi

2024년 6월 26일
·
0개의 댓글
·

메소드 자체 부르기 vs. 메소드가 반환한 결과 부르기

파이썬 공식문서를 보면 메소드(method)는 다음과 같이 정의되어 있다.A function which is defined inside a class body. If called as an attribute of an instance of that class, the

2024년 6월 26일
·
0개의 댓글
·

03_most_common_word

Given a string paragraph and a string array of the banned words banned, return the most frequent word that is not banned. It is guaranteed there is at

2024년 6월 26일
·
0개의 댓글
·

맥북 키보드 반응 (겁나) 빠르게 하기

군생활 때 사수가 마우스 없이 키보드로만 작업하는 걸 보고선 와 멋있다 하면서 감명받고선 따라하다보니깐 습관이 들어서 이후에도 뭔가 작업할 일이 생기면 엔간하면 마우스를 잘 안 쓰는 습관이 생겼는데, 제일 답답할 때가 하나 있었다. 바로 긴 글이나 길게 쓰여진 코드의

2024년 6월 26일
·
0개의 댓글
·

02_reorder_data_in_log_files

제시문: You are given an array of logs. Each log is a space-delimited string of words, where the first word is the identifier. There are two types of l

2024년 6월 20일
·
0개의 댓글
·