개발공부4 [코딩테스트] 탐욕법(Greedy) - 프로그래머스 1. 체육복 (python) def solution(n, lost, reserve): answer = 0 answer = n - len(lost) lost.sort() reserve.sort() D = [i for i in lost if i in reserve] for d in D: lost.remove(d) reserve.remove(d) answer += len(D) for i in lost: if i-1 in reserve: reserve.remove(i-1) answer += 1 elif i+1 in reserve: reserve.remove(i+1) answer += 1 return answer [솔루션] 1. 정렬 2. 특이 조건처리 ) 여벌 체육복을 가져온 학생이 체육복을 도난당했을 수 있습니다. 이때 이 학생은 체육복.. 2021. 9. 6. [캐글스터디] kernel density estimation 1. sns.kdeplot f, ax = plt.subplots(1,1, figsize = (9,5)) sns.kdeplot(df_train[df_train['Survived'] == 1]['Age']) sns.kdeplot(df_train[df_train['Survived'] == 0]['Age']) plt.legend(['Survived == 1', 'Survived == 0']) 2. plot(kind = "kde") plt.figure(figsize =(8,6)) df_train['Age'][df_train['Pclass'] == 1].plot(kind = 'kde') df_train['Age'][df_train['Pclass'] == 2].plot(kind = "kde") df_train['Ag.. 2021. 4. 7. 2. 깃허브(Github) 연동하기 앞서 Visual Studio Code를 설치를 완료했다. 1. 다음으로 git 연동을 위해 설치해야 할 것은 바로 git-scm.com/download Git - Downloads Downloads Mac OS X Windows Linux/Unix Older releases are available and the Git source repository is on GitHub. GUI Clients Git comes with built-in GUI tools (git-gui, gitk), but there are several third-party tools for users looking for a platform-specific git-scm.com 가장 최근 Release 버전을 본인의 PC에 맞게.. 2021. 2. 21. 1. Visual Studio Code 설치 러닝메이트 웹앱(WebApp)개발 일지 웹앱 개발 아이디어가 떠올랐다. 대략적인 아이디어는 구상이 완료 되었고, 간단하게 내 컴퓨터안에서 구동되는 웹앱을 만들어 보려한다. 그 개발 툴로는 비쥬얼스튜디오코드로 선택했다. 다양한 툴들이 있지만, 역시 손에 익은게 최고가 아닐까.. 1. 설치 code.visualstudio.com/docs/?dv=win64user Documentation for Visual Studio Code Find out how to set-up and get the most from Visual Studio Code. Optimized for building and debugging modern web and cloud applications. Visual Studio Code is .. 2021. 2. 21. 이전 1 다음