컴퓨터공학/LeetCode Solutions
개발자가 되는 방법!! 코딩세끼 릿코드 스터디 지금 시작합니다 [안내영상]
코딩테스트 및 인터뷰, 면접을 준비하기 위한 첫 영상!!! 리트코드 스터디 영상을 시청하시기 전에 꼭 봐야할 가이드 영상입니다. 앞으로 어떻게 스터디를 진행하는지에 대한 설명이 있으니 꼭 시청바랍니다. 좋아요, 구독, 댓글, 알람설정 부탁드려요! https://youtu.be/wAS-RgtvC44
릿코드가 도대체 뭐야? 개발자가 되고 싶으면 뭐 부터 공부해야하지? 무조건 공부해야하는 코딩 테스트 준비!!
리트코드(릿코드, leetcode) 공부를 처음 시작하는 분들께 필요한 영상입니다. 어떻게 공부를 시작해야하는지 모르시는 분들, 릿코드 웹사이트에 어떤 서비스가 있는지 모르시는 분들을 위해 준비했습니다. https://youtu.be/SJ1xbxaZhqs - YouTube www.youtube.com
[LeetCode] 100 Same Tree [Easy] 같은 트리
100. Same Tree Given the roots of two binary trees p and q, write a function to check if they are the same or not. Two binary trees are considered the same if they are structurally identical, and the nodes have the same value. Example 1: Input: p = [1,2,3], q = [1,2,3] Output: true Example 2: Input: p = [1,2], q = [1,null,2] Output: false Example 3: Input: p = [1,2,1], q = [1,1,2] Output: false ..
[LeetCode] 1299. Replace Elements with Greatest Element on Right Side
1299. Replace Elements with Greatest Element on Right Side Easy Given an array arr, replace every element in that array with the greatest element among the elements to its right, and replace the last element with -1. After doing so, return the array. Example 1: Input: arr = [17,18,5,4,6,1] Output: [18,6,6,6,1,-1] Explanation: - index 0 --> the greatest element to the right of index 0 is index 1 ..
[LeetCode] 13. Roman to Integer
13. Roman to Integer Easy Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. Symbol Value I 1 V 5 X 10 L 50 C 100 D 500 M 1000 For example, 2 is written as II in Roman numeral, just two ones added together. 12 is written as XII, which is simply X + II. The number 27 is written as XXVII, which is XX + V + II. Roman numerals are usually written largest to smallest f..
[LeetCode] 504. Base 7
504. Base 7 Easy Given an integer num, return a string of its base 7 representation. Example 1: Input: num = 100 Output: "202" Example 2: Input: num = -7 Output: "-10" Constraints: -107
[LeetCode] 326. Power of Three
326. Power of Three Easy Given an integer n, return true if it is a power of three. Otherwise, return false. An integer n is a power of three, if there exists an integer x such that n == 3x. Example 1: Input: n = 27 Output: true Explanation: 27 = 33 Example 2: Input: n = 0 Output: false Explanation: There is no x where 3x = 0. Example 3: Input: n = -1 Output: false Explanation: There is no x whe..
[LeetCode] 242. Valid Anagram
242. Valid Anagram Easy Given two strings s and t, return true if t is an anagram of s, and false otherwise. An Anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once. Example 1: Input: s = "anagram", t = "nagaram" Output: true Example 2: Input: s = "rat", t = "car" Output: false Constraints: 1 bool: # ha..