일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- Kaggle
- 우분투
- 자연어처리
- Git
- 백준
- 맥북
- leetcode
- Baekjoon
- SW Expert Academy
- 파이썬
- 금융문자분석경진대회
- ChatGPT
- 캐치카페
- 데이콘
- programmers
- 프로그래머스
- github
- Docker
- 더현대서울 맛집
- gs25
- ubuntu
- PYTHON
- hackerrank
- 편스토랑 우승상품
- dacon
- 편스토랑
- 프로그래머스 파이썬
- Real or Not? NLP with Disaster Tweets
- 코로나19
- AI 경진대회
- Today
- Total
목록
반응형
전체 글 (1651)
솜씨좋은장씨
Design a HashSet without using any built-in hash table libraries. To be specific, your design should include these functions: add(value): Insert a value into the HashSet. contains(value) : Return whether the value exists in the HashSet or not. remove(value): Remove a value in the HashSet. If the value does not exist in the HashSet, do nothing. Example: MyHashSet hashSet = new MyHashSet(); hashSe..
Given an integer array arr. You have to sort the integers in the array in ascending order by the number of 1's in their binary representation and in case of two or more integers have the same number of 1's you have to sort them in ascending order. Return the sorted array. Example 1: Input: arr = [0,1,2,3,4,5,6,7,8] Output: [0,1,2,4,8,3,5,6,7] Explantion: [0] is the only integer with 0 bits. [1,2..
for 문을 한 줄로 작성하는 방법 ex ) 여러개의 단어가 들어있는 리스트 중에서 길이가 3 이상인 단어만 남기고 싶을 경우 words = ["솜씨좋은장씨", "티스토리", "블로그", "파이썬", "for", "프로그래밍", "반복"] new_words = [ "솜씨좋은장씨", "티스토리", "프로그래밍" ] 기존 코드 new_words = [] for word in words: if len(word) > 3: new_words.append(word) 한 줄로 작성 new_words = [ word for word in words if len(word) > 3 ] 이중 for 문을 한 줄로 작성하는 방법 ex ) 여러 단어들이 담겨있는 2차원 리스트에서 각 리스트 별로 길이가 4 이상인 단어만 남기고..
Given an integer array arr, return true if there are three consecutive odd numbers in the array. Otherwise, return false. Example 1: Input: arr = [2,6,4,1] Output: false Explanation: There are no three consecutive odds. Example 2: Input: arr = [1,2,34,3,4,5,7,23,12] Output: true Explanation: [5,7,23] are three consecutive odds. Constraints: 1
Given the array nums, for each nums[i] find out how many numbers in the array are smaller than it. That is, for each nums[i] you have to count the number of valid j's such that j != i and nums[j] < nums[i]. Return the answer in an array. Example 1: Input: nums = [8,1,2,2,3] Output: [4,0,1,1,3] Explanation: For nums[0]=8 there exist four smaller numbers than it (1, 2, 2 and 3). For nums[1]=1 does..
Given a List of words, return the words that can be typed using letters of alphabet on only one row's of American keyboard like the image below. Example: Input: ["Hello", "Alaska", "Dad", "Peace"] Output: ["Alaska", "Dad"] Note: You may use one character in the keyboard more than once. You may assume the input string will only contain letters of alphabet. Solution class Solution: def findWords(s..
A website domain like "discuss.leetcode.com" consists of various subdomains. At the top level, we have "com", at the next level, we have "leetcode.com", and at the lowest level, "discuss.leetcode.com". When we visit a domain like "discuss.leetcode.com", we will also visit the parent domains "leetcode.com" and "com" implicitly. Now, call a "count-paired domain" to be a count (representing the num..
Given an array A of strings made only from lowercase letters, return a list of all characters that show up in all strings within the list (including duplicates). For example, if a character occurs 3 times in all strings but not 4 times, you need to include that character three times in the final answer. You may return the answer in any order. Example 1: Input: ["bella","label","roller"] Output: ..