전체 글
-
Minimum Coin Change Problem카테고리 없음 2019. 12. 4. 20:07
Minimum Coin Change Problem 은, 아래의 가정에서, 최소 동전의 숫자를 찾는 문제입니다. 몇개의 동전 종류가 있고 S 동전 종류의 수는 M 만들어야할 잔돈 change 문제 자체는 아래링크에 잘 설명되어 있습니다. https://algorithms.tutorialhorizon.com/dynamic-programming-minimum-coin-change-problem/ 좀 무식한 방법으로 recusion으로 풀어 보면 아래와 같습니다. github 에서 보실분은 → Java Source Click!! package com.tistory.skysign.MITOpenCourseWare.R5_Dynamic_Programming; import java.util.ArrayList; // 동전..
-
topcoder PBG에서 시작된 Dynamic Programming의 여정...topcoder.com 2019. 12. 4. 19:53
topcoder PBG문제를 선택한게... 아직 끝나지 않은 Dynamic Programming의 여정의 시작이였습니다. PBG문제를 조금 소개하면, PB와 PG, 2개의 그룹으로 나눠서, 각각 Dynmic Programming을 구현하고, 둘의 결과를 합쳐서 푸는 문제였습니다. PBG는 비교적 최근 치뤄진 SRM768의 난이도 500문제로... 뒷얘기도 기니까, 생략하고... 결론은 답을 봐도 별로 이해가 가지를 않아서... - -;;; PBG문제의 해설에 이렇게 적혀 있는대요.요약하면, PBG문제의 풀이가 이해가지 않으면, https://atcoder.jp/contests/dp/tasks/dp_j 여기가서 문제좀 풀어 보고 오라고... - -;;; https://atcoder.jp/contests/d..
-
Hackerrank.com Practice>Java>Advanced>Java Singleton Patternhackerrank.com 2019. 12. 2. 13:36
Singleton Pattern을 이해하고 있는지에 대해서 묻는 문제 입니다. import java.io.*; import java.util.*; import java.lang.reflect.*; class Singleton{ private Singleton() {} private volatile static Singleton instance; public String str; static Singleton getSingleInstance() { if(null == instance) { synchronized(Singleton.class) { if(null == instance) { instance = new Singleton(); } } } return instance; } }이렇게 구현하는 것이 가장..
-
topcoder.com / AB / Solutiontopcoder.com 2019. 11. 19. 19:26
Tip 문제의 2번재 조건을 잘 활용하면 쉽게 풀수 있습니다, 소스에 이에 대한 설명을 참고하세요. Soure file https://github.com/skysign/WSTT/blob/master/AB/src/com/tistory/skysign/WSTT/AB/AB.java ''' package com.tistory.skysign.WSTT.AB; public class AB{ public String getS(int n, char x){ String rtn = ""; for(int i=0; i
-
topcoder / ANewHope / solutiontopcoder.com 2019. 11. 19. 19:20
tip 문제 상당히 어려웠구요, 이것보다 쉬운 AttackOfTheClones 의 난이도가 medium인것을 가만하면, ANewHope문제도 난이도가 medium은 되어야 할 것 같은대, easy로 되어 있네요. rearrange에 해당하는 문제로, AttackOfTheClones 과 비슷한 문제이지만, 약간 더 어려운 문제 입니다. Source file https://github.com/skysign/WSTT/tree/master/ANewHope/src/com/tistory/skysign/WSTT/ANewHope package com.tistory.skysign.WSTT.ANewHope; import java.util.Arrays; public class ANewHope { public int coun..
-
Udacity / Data Analyst Nanodegree Program / 3. Practical Statistics / Lesson 16: Logistic Regression책, 강연, 스터디 2019. 11. 12. 22:35
Lesson 16: Logistic Regression This is a list of Lecture video in Youtube. Video: Introduction https://www.youtube.com/watch?time_continue=5&v=P_f2RjjnPEg&feature=emb_logo Video: Fitting Logistic Regression https://www.youtube.com/watch?v=Dg0rBDQnIYg&feature=emb_logo Video: Fitting Logistic Regression in Python https://www.youtube.com/watch?time_continue=3&v=baQf-XiZQQ4&feature=emb_logo Video: I..
-
Udacity / Data Analyst Nanodegree Program / 3. Practical Statistics / Lesson 15책, 강연, 스터디 2019. 11. 12. 22:21
Lesson 15 Multiple Linear Regression This is a list of Lecture video in Youtube. Video: Introduction https://www.youtube.com/watch?time_continue=14&v=b26v8HK-8-o Video: Multiple Linear Regression https://www.youtube.com/watch?time_continue=8&v=rvYZp99nj6c Screencast: Fitting A Multiple Linear Regression Model https://www.youtube.com/watch?v=EZNvBF66_b0 Screencast + Text: How Does MLR Work? https..
-
topcoder - A0Papertopcoder.com 2019. 10. 30. 13:48
public class A0Paper { public String canBuild(int[] A){ for(int i = A.length-1; i > 0; --i) A[i-1] += A[i]/2; return (A[0] > 0)? "Possible": "Impossible"; } }Tip 문제 설명에, Letter, Legal, Tabloid 는 무시하셔도 됩니다. Source file https://github.com/skysign/WSTT/tree/master/A0Paper/src/com/tistory/skysign/WSTT/A0Paper