diff --git "a/ksinji/202602/12 PGM \354\212\244\355\213\260\354\273\244\353\252\250\354\234\274\352\270\260(2).md" "b/ksinji/202602/12 PGM \354\212\244\355\213\260\354\273\244\353\252\250\354\234\274\352\270\260(2).md" new file mode 100644 index 00000000..fa77f08d --- /dev/null +++ "b/ksinji/202602/12 PGM \354\212\244\355\213\260\354\273\244\353\252\250\354\234\274\352\270\260(2).md" @@ -0,0 +1,32 @@ +```java +class Solution { + public int solution(int sticker[]) { + int n = sticker.length; + + if (n == 1) { + return sticker[0]; + } + if (n == 2) { + return Math.max(sticker[0], sticker[1]); + } + + int first[] = new int[n]; + first[0] = sticker[0]; + first[1] = sticker[0]; + + for (int i=2; i