leetcode.com/contest/weekly-contest-210 1614. Maximum Nesting Depth of the Parentheses leetcode.com/problems/maximum-nesting-depth-of-the-parentheses/ def maxDepth(self, s): res = cur = 0 for c in s: if c == '(': cur += 1 res = max(res, cur) if c == ')': cur -= 1 return res 괄호문제는 보통 스택이 필요할것 같지만, 잘 생각해보면 필요없다. 그리고 아래의 조건 때문에, 짝이 안맞는것을 디텍팅할 필요도 없다. 문제를 잘 읽자. For example, "", "()()", and "()(()())..
한국인은 유럽에 무비자로 3달간 체류가 가능하다. 즉, 비행기 티켓만 끊어서 나오면 3달동안 유럽일부지역(쉥겐협정지역)에 체류할 수 있는 것이다. 3개의 도시를 골라 한달씩 살아보는것 정말 좋을것 같다. 그렇다면 어느 도시가 디지털노마드를 하기에 좋을까? 내가 가본 도시들은 아래와 같다. 포르투칼 리스본 - 정말 좋음. 발리 짱구 - 진짜 좋음. 독일 베를린 - 그냥 그럼. 괜찮음 태국 치앙마이 - 치앙마이는 안가봤지만, 태국가본 경험으로 정말 좋을듯 멕시코 멕시코시티 - 꼭 가보고 싶다 타이완 타이베이 - 좋은 도시였지만, 한국사람은 주말여행으로도 충분히 타이완을 느낄수있을듯, 굳이 살필요는 없을것 같다. 사우스 아프리카 케이프타운 - 저말 기대되는곳 스페인 Tenerife - 코로나 후에 꼭 가보고싶..
1379. Find a Corresponding Node of a Binary Tree in a Clone of That Tree leetcode.com/problems/find-a-corresponding-node-of-a-binary-tree-in-a-clone-of-that-tree/ Given two binary trees original and cloned and given a reference to a node target in the original tree. The cloned tree is a copy of the original tree. Return a reference to the same node in the cloned tree. Note that you are not allow..
실력 향상을 위해서는 좋은 문제를 풀어야 한다. 좋은 문제란, 실력측정을 위한 여러가지 측면을 두루 포함하고 있고, 그래서 인터뷰시에 측정하려고 하는 공통된 항목에 대해 체험하고 수련할 수 있으며, 라이브러리나 다른 요소에 대한 지식이 실력 측정에 영향을 끼치지 않는 문제를 말한다. 그리고 좋은 풀이를 제공하고 있어야 한다. 대표적으로는 리트코드의 인터뷰퀘스천에 있는 문제들이 좋은 문제라고 할 수 있으며, 아래의 포스팅 및 카테고리를 참고하면 된다. inner-game.tistory.com/40
leetcode.com/contest/weekly-contest-211 1624. Largest Substring Between Two Equal Characters leetcode.com/problems/largest-substring-between-two-equal-characters/ 문제를 잘읽자, 없으면 -1을 반환하라고 되있으니. class Solution: def maxLengthBetweenEqualCharacters(self, s: str) -> int: dic = {} max_len = -1 for i in range(len(s)): if s[i] in dic: max_len = max(max_len, i - dic[s[i]] - 1) else: dic[s[i]] = i return m..
leetcode.com/contest/weekly-contest-212 leetcode.com/problems/slowest-key/ class Solution: def slowestKey(self, releaseTimes: List[int], keysPressed: str) -> str: #Time complexity = O(n) #Space complexity = O(1) maxletter = keysPressed[0] maxvalue = releaseTimes[0] for i in range(1, len(releaseTimes)): value = releaseTimes[i] - releaseTimes[i-1] if value > maxvalue: maxvalue = value maxletter = ..
leetcode.com/contest/weekly-contest-221/ 1704. Determine if String Halves Are Alike leetcode.com/problems/determine-if-string-halves-are-alike/ You are given a string s of even length. 라고 했는데 복잡하게 홀수 처리 하고 있었네. 문제를 잘읽자. class Solution: def halvesAreAlike(self, s: str) -> bool: vowels = set(['a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U']) i = 0 j = len(s)-1 cnt_i = cnt_j = 0 while i < j: if s[..
198. House Robber leetcode.com/problems/house-robber/ 구글기출 213. House Robber II leetcode.com/problems/house-robber-ii/ 337. House Robber III leetcode.com/problems/house-robber-iii/ 656. Coin Path leetcode.com/problems/coin-path/ 구글기출 740. Delete and Earn leetcode.com/problems/delete-and-earn/
leetcode.com/contest/weekly-contest-220 class Solution: def reformatNumber(self, number: str) -> str: ans = "" chunk = "" for n in number: if n.isdigit(): chunk += n if len(chunk) % 3 == 0: if len(ans) != 0: ans += '-' ans += chunk chunk = "" if len(chunk) == 1: chunk = ans[-1] + chunk ans = ans[:-1] if len(chunk) > 0: if len(ans) != 0: ans += '-' ans += chunk return ans 1695. Maximum Erasure Va..
leetcode.com/problems/check-array-formation-through-concatenation/ 공간이 중요할때는 바이너리서치 시간이 중요할때는 해쉬맵 사용 You are given an array of distinct integers arr and an array of integer arrays pieces, where the integers in pieces are distinct. Your goal is to form arr by concatenating the arrays in pieces in any order. However, you are not allowed to reorder the integers in each array pieces[i]. Return true ..
leetcode.com/problems/palindrome-permutation/. class Solution: def canPermutePalindrome(self, s: str) -> bool: val = 0 for letter in s: val = val ^ 1 bool: map = {} for c in s: map[c] = map.get(c, 0) + 1 odd = 0 for (char, count) in map.items(): if count % 2 == 1: odd += 1 return odd bool: count = collections.Counter(s) oddcount = 0 for ele,value in count.items(): if value % 2 != 0: oddcount += ..
www.udacity.com/course/introduction-to-graduate-algorithms--ud401 gt-algorithms.com/ Intro to Grad Algorithms Lecture videos and notes Georgia Tech CS6515 Intro to Grad Algorithms Lecture videos: Open access link (note, quizzes don’t work there) Udacity (need a free Udacity account) Old course page: Spring ’18 1 Dynamic Programming Fibonacci Numbers Longest Increasing Subsequence (LIS) Longest C..
소개 Introduction This Challenge is beginner-friendly and available to both Premium and non-Premium users. It consists of 31 daily problems over the month of January. A problem is added here each day, and you have 24 hours to make a valid submission for it in order to be eligible for rewards. 이 챌린지는 초보자에게 친숙하며 프리미엄 및 비 프리미엄 사용자 모두에게 제공됩니다. 1 월 한 달 동안 매일 31 개의 문제로 구성되어 있습니다. 매일 여기에 문제가 추가되며 보상을 받으려..
Design These problems may require you to implement a given interface of a class, and may involve using one or more data structures. These are great exercises to improve your data structure skills. We recommend: Shuffle an Array Min Stack. 384. Shuffle an Array leetcode.com/problems/shuffle-an-array/ hint The solution expects that we always use the original array to shuffle() else some of the tes..
classroom.udacity.com/courses/ud944 Lesson 1: Ace the Data Scientist Interview RESUME LESSON 1 Data Science Interview Preparation 13% VIEWED Continue LESSON 1 Ace the Data Scientist Interview Identify the different jobs in data science and learn strategies to ace the interview. CONTINUE 25% 11 minutes left Continue LESSON 2 Data Analysis Interview Practice Develop a healthy, confident mindset ar..
classroom.udacity.com/courses/ud252 백엔드 인터뷰 준비과정은 따로 없다. Welcome to the Full Stack Web Developer Interview Course! My name is Dhruv, a Full Stack Engineer at Udacity. You will now observe a mock Full Stack Developer interview between me and a candidate. The mock interview will show the kind of questions you would encounter in a Full Stack Web Developer interview! In addition to watching the mock..
www.udacity.com/school-of-data-science Data Engineer There is a shortage of qualified Data Scientists in the workforce, and individuals with these skills are in high demand. Build skills in programming, data wrangling, machine learning, experiment design, and data visualization, and launch a career in data science. RECOMMENDED PROGRAMS Data Streaming STEP 1 CONCEPTS COVERED Data Streaming, Spark..
classroom.udacity.com/courses/ud171 Lesson 1: How the Web Works BEGIN LESSON 1 Start LESSON 1 How the Web Works Learn about HTML, URLs, and HTTP. START NOT STARTED 2 hours Start LESSON 2 Introduction Learn how to install Python and Google App Engine. START NOT STARTED 1 hour Start LESSON 3 Forms and Inputs Learn about forms and how to handle inputs from your users. START NOT STARTED 4 hours Star..
classroom.udacity.com/courses/ud303 Lesson 1: Requests & Responses BEGIN LESSON 1 HTTP & Web Servers 0% VIEWED Start LESSON 1 Requests & Responses In this lesson, you will examine HTTP requests and responses by experimenting directly with a web server, interacting with it by hand. START NOT STARTED 2 hours Start LESSON 2 The Web from Python In this lesson, you will write HTTP servers and clients..
classroom.udacity.com/courses/ud256 Lesson 1: From Ping to HTTP BEGIN LESSON 1 Networking for Web Developers 0% VIEWED Start LESSON 1 From Ping to HTTP Start exploring the network using low-level command-line tools such as ping and netcat. START NOT STARTED 2 hours Start LESSON 2 Names and Addresses Investigate the Domain Name System (DNS), which translates hostnames into IP addresses. START NOT..
RESTful API 설계 : 개발자가 선호하는 RESTful Developer-Friendly API로 웹 서버를 구축하고 보호하세요. Designing RESTful APIs classroom.udacity.com/courses/ud388 www.youtube.com/watch?v=wrKjdclSXGU&list=PLDyq9ipnszcgxFKdsATyBSTctO9tYoJPi Prerequisite Want to brush up on your Python, Flask, and SQLAlchemy skills? Go ahead and check out Full Stack Foundations to make sure you have an understanding of the python topics used..
classroom.udacity.com/courses/ud897 Lesson 1: HTTP's Request/Response Cycle RESUME LESSON 1 Client-Server Communication 2% VIEWED Continue LESSON 1 HTTP's Request/Response Cycle You'll learn the ins and outs of requests. You'll look at how a page is requested, the headers that are received, HTTP codes, and how data is transferred. CONTINUE 8% 1 hour 9 minutes left Start LESSON 2 HTTP/1 You'll ta..
classroom.udacity.com/courses/ud615 LESSON 1 Introduction to Microservices Learn how modern, always-on applications use the microservices design pattern. 1 hour 51 minutes left LESSON 2 Building the Containers with Docker Use Docker to build container images that package an application and its dependencies for deployment on a single machine. 2 hours LESSON 3 Kubernetes The infrastructure to supp..
289. Game of Life leetcode.com/problems/game-of-life/ 시간 복잡도는 MN일수 밖에없고 공간복잡도는 단순하게 하면 MN이나 생각해보면 O(1)에도 구현할 수 있다. 어프로치2 According to Wikipedia's article: "The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician John Horton Conway in 1970." 콘웨이의 게임이라고도 알려져 있는 문제. The board is made up of an m x n grid of cells, where each cell has an initial state..
페이스북 폰스크린 기출문제, 이 문제는 easy이기 때문에, 관련문제 medium까지 함께 풀이. 859. Buddy Strings leetcode.com/problems/buddy-strings/ Given two strings A and B of lowercase letters, return true if you can swap two letters in A so the result is equal to B, otherwise, return false. Swapping letters is defined as taking two indices i and j (0-indexed) such that i != j and swapping the characters at A[i] and A[j]. For exa..
What technology should you learn next? Many of the emails I receive from Educative’s learners are asking what programming language or technology they should learn to land a job at a big company. It’s a somewhat hard question to answer. The reason is that the most appropriate answer is "follow your passion and learn what excites you the most." Of course, the downside of this answer is that it doe..
리트코드에서 공통조상찾기 문제를 풀어봅시다. leetcode.com/problemset/all/?search=lca 235. Lowest Common Ancestor of a Binary Search Tree leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree/ 진정한 LCA 문제라기 보다는, BST의 특성을 이용해 값을 기준으로 부모노드의 위치를 찾아가는 문제. class Solution: def lowestCommonAncestor(self, root: 'TreeNode', p: 'TreeNode', q: 'TreeNode') -> 'TreeNode': parent_val = root.val p_val = p.val q_val =..