본문 바로가기

Algorithm/Leet Code

(124)
LeetCode #104 MaximumDepthOfBinaryTree. Algorithm,알고리즘,LeetCode,Codefights,CodeSignal,코드파이트,코드시그널,예제,문제해결능력,example,c++,java,재귀,recursive,datastructure,techinterview,coding,코딩인터뷰,기술면접 LeetCode #104 MaximumDepthOfBinaryTree. Algorithm,알고리즘,LeetCode,Codefights,CodeSignal,코드파이트,코드시그널,예제,문제해결능력,example,c++,java,재귀,recursive,datastructure,techinterview,coding,코딩인터뷰,기술면접 Nice performance LeetCode #104 Q. Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node. Note: A leaf is a no..
LeetCode #118 Pascal'sTriangle. Algorithm,알고리즘,LeetCode,Codefights,CodeSignal,코드파이트,코드시그널,예제,문제해결능력,example,c++,java,재귀,recursive,datastructure,techinterview,coding,코딩인터뷰,기술면접 LeetCode #118 Pascal'sTriangle. Algorithm,알고리즘,LeetCode,Codefights,CodeSignal,코드파이트,코드시그널,예제,문제해결능력,example,c++,java,재귀,recursive,datastructure,techinterview,coding,코딩인터뷰,기술면접 LeetCode #118 Q. Given a non-negative integer numRows, generate the first numRows of Pascal's triangle. In Pascal's triangle, each number is the sum of the two numbers directly above it. e.g. Example: Input: 5 Output: [ [1..
LeetCode #88 MergeSortedAray. Algorithm,알고리즘,LeetCode,Codefights,CodeSignal,코드파이트,코드시그널,예제,문제해결능력,example,c++,java,재귀,recursive,datastructure,techinterview,coding,코딩인터뷰,기술면접 LeetCode #88 MergeSortedAray. Algorithm,알고리즘,LeetCode,Codefights,CodeSignal,코드파이트,코드시그널,예제,문제해결능력,example,c++,java,재귀,recursive,datastructure,techinterview,coding,코딩인터뷰,기술면접 어제 했던 병합정렬 쉬운 버전.. Easy version of the merge sort what i did yesterday.. LeetCode #88 Q. Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array. 주어진 두개의 정렬된 정수 배열에서, 두개를 합쳐서 한개의 정렬된 배열을 만..
LeetCode #021 MergeTwoSortedLists. Algorithm,알고리즘,LeetCode,Codefights,CodeSignal,코드파이트,코드시그널,예제,문제해결능력,example,c++,java,재귀,recursive,datastructure,techinterview,coding,코딩인터뷰,기술면접 LeetCode #021 MergeTwoSortedLists. Algorithm,알고리즘,LeetCode,Codefights,CodeSignal,코드파이트,코드시그널,예제,문제해결능력,example,c++,java,재귀,recursive,datastructure,techinterview,coding,코딩인터뷰,기술면접 노드 구조체를 포인터 써서 이동함. 퍼포먼스 중상, 메모리 상 LeetCode #21 Q. Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. 두개의 정렬된 연결리스트를 병합해서 새로운 리스..
LeetCode #83 RemoveDuplicatesFromSortedList. Algorithm,알고리즘,LeetCode,Codefights,CodeSignal,코드파이트,코드시그널,예제,문제해결능력,example,c++,java,재귀,recursive,datastructure,techinterview,coding,코딩인터뷰,기술면접 LeetCode #83 RemoveDuplicatesFromSortedList. Algorithm,알고리즘,LeetCode,Codefights,CodeSignal,코드파이트,코드시그널,예제,문제해결능력,example,c++,java,재귀,recursive,datastructure,techinterview,coding,코딩인터뷰,기술면접 노드 구조체를 포인터 써서 이동함. 퍼포먼스 100% Move using node struct. 100% performance.. LeetCode #83 Q. Given a sorted linked list, delete all duplicates such that each element appear only once. 주어진 정렬된 연결리스트에서, 중복되는 인자들을 다 ..
LeetCode #100 SameTree. Algorithm,알고리즘,LeetCode,Codefights,CodeSignal,코드파이트,코드시그널,예제,문제해결능력,example,c++,java,재귀,recursive,datastructure,techinterview,coding,코딩인터뷰,기술면접, dynamicProgramming LeetCode #100 SameTree. Algorithm,알고리즘,LeetCode,Codefights,CodeSignal,코드파이트,코드시그널,예제,문제해결능력,example,c++,java,재귀,recursive,datastructure,techinterview,coding,코딩인터뷰,기술면접, dynamicProgramming 술 취해서 제정신 아님,, leetcode compiler 좀 이상한듯?? null 검사 안하면 if 문에서 compile 안돼서 좀 헤멤.. I'm kinda wasted,, and leetcode compiler was weired.. or me?? If i don't check NULL, then it return compiler error,,, in if statem..
LeetCode #169 MajorityElement. Algorithm,알고리즘,LeetCode,Codefights,CodeSignal,코드파이트,코드시그널,예제,문제해결능력,example,c++,java,재귀,recursive,datastructure,techinterview,coding,코딩인터뷰,기술면접 LeetCode #169 MajorityElement. Algorithm,알고리즘,LeetCode,Codefights,CodeSignal,코드파이트,코드시그널,예제,문제해결능력,example,c++,java,재귀,recursive,datastructure,techinterview,coding,코딩인터뷰,기술면접 퍼포먼스 어정쩡할 느낌이었는데 98% 나옴. std::find 포스팅 하자마자 find 쓰는 문제 풀어서 상쾌함 I thought it's performance would not that good, but it's 98%. Also I'm proud of me, cuz I posted std::find function right before it and I solved this using that..
LeetCode #202 HappyNumber. Algorithm,알고리즘,LeetCode,Codefights,CodeSignal,코드파이트,코드시그널,예제,문제해결능력,example,c++,java,재귀,recursive,datastructure,techinterview,coding,코딩인터뷰,기술면접 LeetCode #202 HappyNumber. Algorithm,알고리즘,LeetCode,Codefights,CodeSignal,코드파이트,코드시그널,예제,문제해결능력,example,c++,java,재귀,recursive,datastructure,techinterview,coding,코딩인터뷰,기술면접 30분정도.. 3번 제출.. 퍼포먼스 100%.. 30min.. submit 3 times.. 100% performance.. LeetCode #202 Q. Write an algorithm to determine if a number is "happy". A happy number is a number defined by the following process: Starting with any pos..