This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM golang:1.22.1-alpine3.19 AS builder | |
ARG GIT_USER=hsadiaigit | |
ARG GIT_PRIVATE_TOKEN | |
ARG GO_PRIVATE=github.com/hsadiaigit/ai_platform_common | |
ENV CGO_ENABLED=0 \ | |
GOOS=linux \ | |
GOARCH=amd64 \ | |
CONFIG_FILE=.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package programmers.creema; | |
import java.util.*; | |
public class Creema { | |
public static void main(String[] args) { | |
Sol1 s1 = new Sol1(); | |
// s1.getFinalString("AWAWSSG"); | |
Sol2 s2 = new Sol2(); | |
// long range = s2.findRange(1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Solution { | |
int module = (int) Math.pow(10,9)+7; | |
public int maxProduct(TreeNode root) { | |
List<Long> sum = new ArrayList<>(); | |
long total = getTotalSum(root,sum); | |
int max = 0; | |
for (Long target : sum) { | |
long t = (target * (total - target); | |
max = Math.max(max,t); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1번 솔루션 1ms | |
class Solution { | |
public int strStr(String hay, String needle) { | |
if(needle.length() > hay.length())return -1; // 니들이 길다면 굳이 탐색해줄 필요없이 -1 뱉어줍니다. | |
if(needle.length() == hay.length()){ // 만약 서로의 길이가 같다면 ? 서로 문자열 비교해서 맞으면 0 리턴해줍니다. | |
if(cal(needle,hay)){ | |
return 0; | |
}else{ | |
return -1; // 아닌경우 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package BruteForce; | |
/** | |
0 4 0 0 0 0 2 0 0 | |
0 6 0 0 0 5 0 0 0 | |
2 0 5 0 8 0 0 0 7 | |
0 0 6 0 0 0 0 0 0 | |
5 0 7 0 0 1 9 0 0 | |
0 0 0 0 4 0 0 1 0 | |
0 0 0 3 0 0 0 0 8 |