LeetCode #242 ValidAnagram. Algorithm,알고리즘,LeetCode,Codefights,CodeSignal,코드파이트,코드시그널,예제,문제해결능력,example,c++,java,재귀,recursive,datastructure,techinterview,coding,코딩인터뷰,기술면접
LeetCode #242 ValidAnagram. Algorithm,알고리즘,LeetCode,Codefights,CodeSignal,코드파이트,코드시그널,예제,문제해결능력,example,c++,java,재귀,recursive,datastructure,techinterview,coding,코딩인터뷰,기술면접 금방 풀었고, 한번에 통과했는데 퍼포먼스까지 상위 1% 라서 꿀잠 잘ㄷ스 Solved in a short time at once, also performance is upper 1%. So I could sleep well tonighty night LeetCode #242Q. Given two strings s and t , write a function to determine if t is an a..
LeetCode #225 ImplementStackUsingQueue. Algorithm,알고리즘,LeetCode,Codefights,CodeSignal,코드파이트,코드시그널,예제,문제해결능력,example,c++,java,재귀,recursive,datastructure,techinterview,coding,코딩인터뷰,기술면접
LeetCode #225 ImplementStackUsingQueue. Algorithm,알고리즘,LeetCode,Codefights,CodeSignal,코드파이트,코드시그널,예제,문제해결능력,example,c++,java,재귀,recursive,datastructure,techinterview,coding,코딩인터뷰,기술면접 큐를 쓰라고 했는데 그냥 벡터로 풀었음 It said using Queue, but used Vector LeetCode #225Q. Implement the following operations of a stack using queues.큐를 이용해서 스택의 함수들을 구현해라. push(x) -- Push element x onto stack.pop() -- Removes the..
LeetCode #220 ContainsDuplicate3. Algorithm,알고리즘,LeetCode,Codefights,CodeSignal,코드파이트,코드시그널,예제,문제해결능력,example,c++,java,재귀,recursive,datastructure,techinterview,coding,코딩인터뷰,기술면접
LeetCode #220 ContainsDuplicate3. Algorithm,알고리즘,LeetCode,Codefights,CodeSignal,코드파이트,코드시그널,예제,문제해결능력,example,c++,java,재귀,recursive,datastructure,techinterview,coding,코딩인터뷰,기술면접 2번과 비슷하여 쉽게 풀렸지만, abs 절대값 함수를 쓰는데 int 범위를 넘는 값이 예외 케이스를 만들어서 문법을 보느라 오래걸렸다. 31 / 41 test case [2147483647,-2147483647] 1 2147483647 이 케이스인데, 예를 들어 abs(-2147483647) 이라 하면 안돼고, abs((long)-2147483647) 이런식으로 형변환 후 접근해야한다. 후...
LeetCode #219 ContainsDuplicate2. Algorithm,알고리즘,LeetCode,Codefights,CodeSignal,코드파이트,코드시그널,예제,문제해결능력,example,c++,java,재귀,recursive,datastructure,techinterview,coding,코딩인터뷰,기술면접
LeetCode #219 ContainsDuplicate2. Algorithm,알고리즘,LeetCode,Codefights,CodeSignal,코드파이트,코드시그널,예제,문제해결능력,example,c++,java,재귀,recursive,datastructure,techinterview,coding,코딩인터뷰,기술면접 이건 단순히 쭉 돌면서 찾아보도록 풀었고, 더 좋은 것은 입력받은 k 의 범위만큼 hash 테이블을 만들어서 한바퀴에 끝낼 수 있도록 하는게 제일 빠르다고 한다. 풀고나서 보았지만 다시 고쳐보지는 않았음 It's just solve using iteration twice, but better one is making hash table length k. I knew after solving ..
LeetCode #217 ContainsDuplicate. Algorithm,알고리즘,LeetCode,Codefights,CodeSignal,코드파이트,코드시그널,예제,문제해결능력,example,c++,java,재귀,recursive,datastructure,techinterview,coding,코딩인터뷰,기술면접
LeetCode #217 ContainsDuplicate. Algorithm,알고리즘,LeetCode,Codefights,CodeSignal,코드파이트,코드시그널,예제,문제해결능력,example,c++,java,재귀,recursive,datastructure,techinterview,coding,코딩인터뷰,기술면접 비주얼스튜디오에 전에 풀었던게 몇개 있긴한데, 새로 풀면서 하나씩 올리고 못푸는날은 전에 풀었던 것을 정리해서 올려야겠다. 두 종류로 풀었고, 두번째의 성능이 월등히 좋았다. I did twice, and 2nd one performance was much better than the 1st one. LeetCode #217Q.Given an array of integers, find if t..