본문 바로가기

leetcode

(151)
LeetCode #905 SortArrayByParity. Algorithm,알고리즘,LeetCode,Codefights,CodeSignal,코드파이트,코드시그널,예제,문제해결능력,example,c++,java,재귀,recursive,datastructure,techinterview,coding,코딩인터뷰,기술면접 LeetCode #905 SortArrayByParity. Algorithm,알고리즘,LeetCode,Codefights,CodeSignal,코드파이트,코드시그널,예제,문제해결능력,example,c++,java,재귀,recursive,datastructure,techinterview,coding,코딩인터뷰,기술면접 2가지로 풀었는데, 한개는 퍼포먼스가 조금 더 잘나오고, 한개는 메모리 사용량이 적다. I solved twice, one has slightly better performance, another one has better memory usage. LeetCode #905Q. Given an array A of non-negative integers, return an array consist..
LeetCode #593 ValidSquare. Algorithm,알고리즘,LeetCode,Codefights,CodeSignal,코드파이트,코드시그널,예제,문제해결능력,example,c++,java,재귀,recursive,datastructure,techinterview,coding,코딩인터뷰,기술면접 LeetCode #593 ValidSquare. Algorithm,알고리즘,LeetCode,Codefights,CodeSignal,코드파이트,코드시그널,예제,문제해결능력,example,c++,java,재귀,recursive,datastructure,techinterview,coding,코딩인터뷰,기술면접 이렇게 저렇게 3~ 4가지 방법으로 풀려고 해봤고, 계속 예외케이스에서 이렇게 저렇게 걸려서 한참 걸렸다. 결국 그냥 단순하게 풀었는데 속도도 거의 최상위로 나오고 잘 풀렸다. (0~ 4ms) LeetCode #593Q. Given the coordinates of four points in 2D space, return whether the four points could construct a squa..
Aracade Intro #60 sudoku. Algorithm,알고리즘,Codefights,CodeSignal,코드파이트,코드시그널,예제,문제해결능력,example,c++,java,재귀,recursive Aracade Intro #60 sudoku. Algorithm,알고리즘,Codefights,CodeSignal,코드파이트,코드시그널,예제,문제해결능력,example,c++,java,재귀,recursive 문제를 풀어놓은지는 거의 1년이 넘었는데, 드디어 아케이드 60문제의 마지막을 올리게 되었다. 풀어놓았던 것이라서 다시 풀고 정리하며 제대로 올리고 싶었지만, 다시 풀기가 상당히 귀찮게 느껴져서 처리과정만 정리해서 60개 다 올린 것도 다행이라 생각한다. 아케이드 말고 코드시그널의 다른 챕터 문제들도 풀어둔게 있지만, 이제 릿코드 문제를 가끔 새로 풀면서 올리려고 한다. I solved arcade problem in codefights(codesignals) almost a year ago, but ..
Aracade Intro #59 spiralNumbers. Algorithm,알고리즘,Codefights,CodeSignal,코드파이트,코드시그널,예제,문제해결능력,example,c++,java,재귀,recursive Aracade Intro #59 spiralNumbers. Algorithm,알고리즘,Codefights,CodeSignal,코드파이트,코드시그널,예제,문제해결능력,example,c++,java,재귀,recursive Q. Construct a square matrix with a size N × N containing integers from 1 to N * N in a spiral order, starting from top-left and in clockwise direction. 입력받은 정수 N, N x N 사이즈의 매트릭스를 만드는데, 왼쪽 제일 위쪽의 숫자 1부터 시계방향의 나선(소용돌이)형으로 매트릭스를 채워나간다. e.g. Input -> n = 3 Output -> spiralNumbe..
Aracade Intro #57 fileNaming. Algorithm,알고리즘,Codefights,CodeSignal,코드파이트,코드시그널,예제,문제해결능력,example,c++,java,재귀,recursive Aracade Intro #57 fileNaming. Algorithm,알고리즘,Codefights,CodeSignal,코드파이트,코드시그널,예제,문제해결능력,example,c++,java,재귀,recursive Recursive solotion재귀풀이 Q. You are given an array of desired filenames in the order of their creation. Since two files cannot have equal names, the one which comes later will have an addition to its name in a form of (k), where k is the smallest positive integer such that the obt..
Aracade Intro #56 digitsProduct. Algorithm, 알고리즘, Codefights, CodeSignal, 코드파이트, 코드시그널, 예제,문제해결능력,example, c++ java c# scalar Aracade Intro #56 digitsProduct. Algorithm, 알고리즘, Codefights, CodeSignal, 코드파이트, 코드시그널, 예제,문제해결능력,example, c++ java c# scalar 문제가 너무 그지같은데.. 풀긴 풀었었으나, 다시 보니까 다시 깔끔하게 정리할 필요가 없을 것 같아서 그냥 풀 당시에 쓴 처리과정 그대로 옮겨넣어둠. It was the worst question ever, so I didn't solve again and order it. Just copied solution and process i did before. Q. Given an integer product, find the smallest positive (i.e. greater t..
Aracade Intro #55 differentSquares. Algorithm, 알고리즘, Codefights, CodeSignal, 코드파이트, 코드시그널, 예제,문제해결능력,example, c++ java c# scalar Aracade Intro #55 differentSquares. Algorithm, 알고리즘, Codefights, CodeSignal, 코드파이트, 코드시그널, 예제,문제해결능력,example, c++ java c# scalar Q. Given a rectangular matrix containing only digits, calculate the number of different 2 × 2 squares in it. 숫자만 들어있는 주어진 매트릭스에서, 각기 안에 다른 숫자를 가진 2x2 사이즈 사각형의 개수를 구하여라. e.g. Input -> matrix = [[1, 2, 1], [2, 2, 2], [2, 2, 2], [1, 2, 3], [2, 2, 1]] Output -> differentSq..
Taurine 타우린 usage/side effects/dosage/fatigue/supplement,효능/부작용/성인,소아 용법/건강/피로회복/영양제 Taurine 타우린 usage/side effects/dosage/fatigue/supplement,효능/부작용/성인,소아 용법/건강/피로회복/영양제 원글 ( 여기 )Origin ( Here ) Recommended Dosage of Taurine 타우린의 용법 추천 Taurine is an amino acid. Your body requires numerous amino acids, as they play a role in almost every vital physiologic process including muscle growth, neurologic function, protection of cells and proper function of the immune system. Taurine is..