Skip to content

Instantly share code, notes, and snippets.

View Guiwoo's full-sized avatar
🎯
Focusing

Guiwoo Park Guiwoo

🎯
Focusing
  • Plea
  • Seoul
  • 16:35 (UTC +09:00)
View GitHub Profile
@Guiwoo
Guiwoo / dockerfile
Created April 3, 2024 01:31
dockerfile help
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
@Guiwoo
Guiwoo / Cotest.java
Created February 13, 2023 15:20
김란에게
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);
@Guiwoo
Guiwoo / sol.java
Created December 10, 2022 14:06
1339. Maximum Product of Splitted Binary Tree
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);
}
@Guiwoo
Guiwoo / strStrImplementation.java
Created June 28, 2022 10:40
6월29일자 strStr구현
// 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; // 아닌경우
}
@Guiwoo
Guiwoo / CrapSudoku.java
Last active June 22, 2022 07:04
6월 22일자 스도쿠
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