- Notifications
You must be signed in to change notification settings - Fork99
프로그래머스 코딩테스트 해설 모음집
NotificationsYou must be signed in to change notification settings
codeisneverodd/programmers-coding-test
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
검색 사이트의 코드는이 저장소에 공개되어 있어요
- 🌱 다양한 사람의 프로그래머스의 코딩테스트 정답이 올라와있어요!
- ✅ 프로그래머스는 정답을 통과시키면 다른 사람들의 풀이를 볼 수 있어요!
- 🔎 검색 사이트 를 통해 간편하게 검색하고 풀이를 올릴 수 있어요!
- ⭐도움이 되셨다면 오른쪽 상단 ↗ 의 ⭐️Star를 클릭해 이 프로젝트를 응원해주세요!
- 코딩테스트 공부에 왕도는 없으며, 다양한 사람들의 풀이를 보며 많은 문제를 푸는 것이 최고의 방법입니다.
- 문제 업로드 방식 개선과 정답 관리를 위해기존 README 방식에서🔎 검색 사이트에서 검색하는 방식으로 바뀌었어요!
- 문제 목록과 정답은이 파일들로 관리되고 있어요. GitHub API를 이용해서 해당 파일을 자유롭게 사용해도 좋아요! 단, 코드를 보여주는 경우 반드시 아래 저작권을 따라주세요.
해당 Repository의 해답을 자신의 저작물에 추가할 수 있지만반드시 본 Repository의주소https://github.com/codeisneverodd/programmers-coding-test
를 명시하여야합니다.
저와 같이 우리 레포의 데이터를 활용하고 싶으신 분들을 위해 타입과 간단한 예제를 남겨놓을게요!
axios나 tanstack query 등 라이브러리 사용에 익숙하지 않거나 TypeScript에 익숙하지 않은 분들을 위한 간단한 예제에요.
constDATA_ENDPOINT="https://raw.githubusercontent.com/codeisneverodd/programmers-coding-test/main-v2/data";exportconstgetProbs=async()=>{constres=awaitfetch(`${DATA_ENDPOINT}/problems.json`);returnres.json();};exportconstgetSols=async()=>{constres=awaitfetch(`${DATA_ENDPOINT}/solutions.json`);returnres.json();};
우리 레포에서 오는 값을 사용할 수 있는 custom hook 인useRepo
를 만드는 예제에요.
import{useQuery}from"@tanstack/react-query";importaxiosfrom"axios";constDATA_ENDPOINT="https://raw.githubusercontent.com/codeisneverodd/programmers-coding-test/main-v2/data";exportdefaultfunctionuseRepo(){constprobsQuery=useQuery({queryKey:["repo","sols"],queryFn:async()=>{constres=awaitaxios.get<Sol[]>(`${DATA_ENDPOINT}/problems.json`);returnres.data;}});constsolsQuery=useQuery({queryKey:["repo","probs"],queryFn:async()=>{constres=awaitaxios.get<Prob[]>(`${DATA_ENDPOINT}/solutions.json`);returnres.data;}});return{ probsQuery, solsQuery};}exporttypeProb={id:string;title:string;solvedCount:number;};exporttypeSol={id:string;author:string;code:string;probId:string;createdAt:ReturnType<typeofDate.now>;lang:Lang;};exporttypeLang="JavaScript"|"Python";
About
프로그래머스 코딩테스트 해설 모음집
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.