Skip to content

Instantly share code, notes, and snippets.

View jeon3029's full-sized avatar
๐Ÿ 
Working from home

jeon3029

๐Ÿ 
Working from home
  • Republic of Korea, Seoul
View GitHub Profile
@jeon3029
jeon3029 / bits-stdc++.h
Created April 9, 2024 02:30 — forked from Einstrasse/bits-stdc++.h
bits/stdc++.h header file
// C++ includes used for precompiling -*- C++ -*-
// Copyright (C) 2003-2015 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
@jeon3029
jeon3029 / gist:3ed5f3c3d5aba68597617d6ec11969c5
Created October 2, 2021 13:53
c++ / unordered map with class Example
#include<unordered_map>
#include<iostream>
using namespace std;
class A{
  private:
    int x;
    int y;
    float x_f;
 float y_f;
@jeon3029
jeon3029 / surjective.c
Created June 22, 2021 08:07 — forked from thinkphp/surjective.c
Generating the total number of surjective functions
#include <stdio.h>
#define SIZE 100
int stack[SIZE],
level,
N,
M;
void init() {
#include <iostream>
#include <string>
#include <cstdio>
#include <vector>
using namespace std;
vector<int> getPi(string p){
int m = (int)p.size(), j=0;
vector<int> pi(m, 0);
for(int i = 1; i< m ; i++){
while(j > 0 && p[i] != p[j])
@jeon3029
jeon3029 / ssafy_lecturenote(Chap2).md
Last active November 29, 2019 03:17
SSAFY lecture note

ํ•ดํ‚น์ด ์–ด๋ ค์›Œ ํ™œ์šฉ๋ถ„์•ผ ๋งŽ์€ ๊ธฐ์ˆ 
: [๋ธ”๋ก์ฒด์ธ]

ํ•ต์‹ฌ ๋‚ด์šฉ ์ •๋ฆฌ

  • ๋ธ”๋ก์€ ๊ฐ€์ƒ์˜ ์žฅ๋ถ€๋ฅผ ์˜๋ฏธ(์•”ํ˜ธํ™” ๋˜์–ด ์ €์žฅ)
  • ์—ฌ๋Ÿฌ์‚ฌ๋žŒ์ด ๋™์ผํ•˜๊ฒŒ ๋ธ”๋ก์„ ๋‚˜๋ˆ„์–ด ๊ฐ€์ง
  • ํ•˜๋‚˜์˜ ๋ธ”๋ก์ด ํ•ดํ‚น๋˜์–ด๋„ ๋ถ„์‚ฐ ์ €์žฅ๋˜์–ด์žˆ๊ธฐ ๋•Œ๋ฌธ์— ์‚ฌ์‹ค์ƒ ํ•ดํ‚น(์œ„,๋ณ€์กฐ)์ด ๋ถˆ๊ฐ€ --> ์ค‘์•™ํ†ต์ œ ์—†์ด๋„ ๊ฑฐ๋ž˜๊ฐ€ ๊ฐ€๋Šฅ
  • ์ œ 2์˜ ์ธํ„ฐ๋„ท์ด๋ผ๊ณ ๋„ ๋ถˆ๋ฆผ๏ฟฝ

๊ฐ•์˜ ๋‚ด์šฉ ์ •๋ฆฌ

@jeon3029
jeon3029 / 20190808_codinginterview(chap1).md
Last active August 16, 2019 13:09
20190808_codinginterview(chap1to5) / ์ฝ”๋”ฉ์ธํ„ฐ๋ทฐ ์™„์ „๋ถ„์„(1~5์žฅ) ์š”์•ฝ

Chap1. ๋ฉด์ ‘๊ณผ์ •


1. ๊ฐœ์š”


๋Œ€๋ถ€๋ถ„์˜ ํšŒ์‚ฌ์˜ ๋ฉด์ ‘ ๊ณผ์ •

  1. ์‚ฌ์ „๋ฉด์ ‘(์ „ํ™”, ์ˆ™์ œ์ฝ”๋”ฉ ๋“ฑ๋“ฑ..)
  2. ๋ฐฉ๋ฌธ ๋ฉด์ ‘(๊ตฌ์ˆ ์ฝ”๋”ฉ, ์•Œ๊ณ ๋ฆฌ์ฆ˜, ์ด๋ ฅ์„œ)
  3. ๋ฉด์ ‘๊ด€๋ผ๋ฆฌ ๋ชจ์—ฌ ์„ฑ์ ํ† ๋ก  -> ๊ฒฐ๊ณผ ํ†ต๋ณด