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

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
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
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
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
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
"passes" and "pointers" represent two different approaches to solving problems, particularly when working with arrays or lists.A pass refers to going
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
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
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
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
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,
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
Given a string s, return the longest palindromic substring in s. 역시나 못 풀었던 문제였다. 로직은 짰는데 사실상 brute-force식이었는데 그마저도 어떻게 구현해야할지 감이 도저히 안 와서 좌절했었는데, 원체
이름도 비슷하고 기능도 비슷해서 헷갈리는 함수인 sort()와 sorted(). 공통점과 차이점은 다음과 같다. 그리고 매우 정리가 잘 된 포스트가 있으니 이거 먼저 보는 게 좋을 듯. 아래 내용은 그걸 위주로 해서 내 식대로 정리한 것.공통점1) 리스트를 정렬한다.2
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
파이썬 공식문서를 보면 메소드(method)는 다음과 같이 정의되어 있다.A function which is defined inside a class body. If called as an attribute of an instance of that class, the
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
군생활 때 사수가 마우스 없이 키보드로만 작업하는 걸 보고선 와 멋있다 하면서 감명받고선 따라하다보니깐 습관이 들어서 이후에도 뭔가 작업할 일이 생기면 엔간하면 마우스를 잘 안 쓰는 습관이 생겼는데, 제일 답답할 때가 하나 있었다. 바로 긴 글이나 길게 쓰여진 코드의
제시문: 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