전체 글
-
int findMedian(vector arr) { sort(arr.begin(), arr.end()); int n = arr.size(); int median = arr[n / 2]; return median; }
[HackerRank] Find Medianint findMedian(vector arr) { sort(arr.begin(), arr.end()); int n = arr.size(); int median = arr[n / 2]; return median; }
2023.10.19 -
void fizzBuzz(int n) { for (int i = 1; i
[HackerRank] FizzBuzzvoid fizzBuzz(int n) { for (int i = 1; i
2023.10.19 -
https://www.hackerrank.com/challenges/one-week-preparation-kit-time-conversion Time Conversion | HackerRank Convert time from an AM/PM format to a 24 hour format. www.hackerrank.com #include using namespace std; /* * Complete the 'timeConversion' function below. * * The function is expected to return a STRING. * The function accepts STRING s as parameter. */ string timeConversion(string s) { str..
[HackerRank] Time Conversionhttps://www.hackerrank.com/challenges/one-week-preparation-kit-time-conversion Time Conversion | HackerRank Convert time from an AM/PM format to a 24 hour format. www.hackerrank.com #include using namespace std; /* * Complete the 'timeConversion' function below. * * The function is expected to return a STRING. * The function accepts STRING s as parameter. */ string timeConversion(string s) { str..
2023.10.19 -
https://www.hackerrank.com/challenges/one-week-preparation-kit-mini-max-sum Mini-Max Sum | HackerRank Find the maximum and minimum values obtained by summing four of five integers. www.hackerrank.com #include using namespace std; string ltrim(const string &); string rtrim(const string &); vector split(const string &); /* * Complete the 'miniMaxSum' function below. * * The function accepts INTEGE..
[HackerRank] Mini-Max-Sumhttps://www.hackerrank.com/challenges/one-week-preparation-kit-mini-max-sum Mini-Max Sum | HackerRank Find the maximum and minimum values obtained by summing four of five integers. www.hackerrank.com #include using namespace std; string ltrim(const string &); string rtrim(const string &); vector split(const string &); /* * Complete the 'miniMaxSum' function below. * * The function accepts INTEGE..
2023.10.19 -
https://www.hackerrank.com/challenges/one-week-preparation-kit-plus-minus Plus Minus | HackerRank Calculate the fraction of positive, negative and zero values in an array. www.hackerrank.com #include using namespace std; string ltrim(const string &); string rtrim(const string &); vector split(const string &); /* * Complete the 'plusMinus' function below. * * The function accepts INTEGER_ARRAY ar..
[HackerRank] Plus Minushttps://www.hackerrank.com/challenges/one-week-preparation-kit-plus-minus Plus Minus | HackerRank Calculate the fraction of positive, negative and zero values in an array. www.hackerrank.com #include using namespace std; string ltrim(const string &); string rtrim(const string &); vector split(const string &); /* * Complete the 'plusMinus' function below. * * The function accepts INTEGER_ARRAY ar..
2023.10.19 -
https://www.hackerrank.com/challenges/arrays-ds Arrays - DS | HackerRank Accessing and using arrays. www.hackerrank.com #include #include using namespace std; string ltrim(const string &); string rtrim(const string &); vector split(const string &); /* * Complete the 'reverseArray' function below. * * The function is expected to return an INTEGER_ARRAY. * The function accepts INTEGER_ARRAY a as p..
[HackerRank] arrays-dshttps://www.hackerrank.com/challenges/arrays-ds Arrays - DS | HackerRank Accessing and using arrays. www.hackerrank.com #include #include using namespace std; string ltrim(const string &); string rtrim(const string &); vector split(const string &); /* * Complete the 'reverseArray' function below. * * The function is expected to return an INTEGER_ARRAY. * The function accepts INTEGER_ARRAY a as p..
2023.10.19 -
https://www.hackerrank.com/challenges/2d-array/problem 2D Array - DS | HackerRank How to access and use 2d-arrays. www.hackerrank.com #include using namespace std; string ltrim(const string &); string rtrim(const string &); vector split(const string &); /* * Complete the 'hourglassSum' function below. * * The function is expected to return an INTEGER. * The function accepts 2D_INTEGER_ARRAY arr ..
[HackerRank] 2d arrayhttps://www.hackerrank.com/challenges/2d-array/problem 2D Array - DS | HackerRank How to access and use 2d-arrays. www.hackerrank.com #include using namespace std; string ltrim(const string &); string rtrim(const string &); vector split(const string &); /* * Complete the 'hourglassSum' function below. * * The function is expected to return an INTEGER. * The function accepts 2D_INTEGER_ARRAY arr ..
2023.10.19 -
https://www.hackerrank.com/challenges/dynamic-array Dynamic Array | HackerRank Learn to use dynamic arrays by solving this problem. www.hackerrank.com #include using namespace std; string ltrim(const string &); string rtrim(const string &); vector split(const string &); /* * Complete the 'dynamicArray' function below. * * The function is expected to return an INTEGER_ARRAY. * The function accept..
[HackerRank] Dynamic Arrayhttps://www.hackerrank.com/challenges/dynamic-array Dynamic Array | HackerRank Learn to use dynamic arrays by solving this problem. www.hackerrank.com #include using namespace std; string ltrim(const string &); string rtrim(const string &); vector split(const string &); /* * Complete the 'dynamicArray' function below. * * The function is expected to return an INTEGER_ARRAY. * The function accept..
2023.10.19 -
1. 환경설정 및 Hello World 1. SASM 설치 2. 환경설정에서 build -> x64, nasm 으로 설정 3. 새 프로젝트 만들기 4. 다음과 같이 입력하면 Hello World 를 출력할 수 있다. %include "io64.inc" section .text global CMAIN: CMAIN: ;write your code here PRINT_STRING msg xor rax, rax ret section .data msg db 'Hello World', 0x00 5. save .exe 하면 실행 파일로 저장도 가능하다. 2. 데이터 기초 2.1 컴퓨터는 정수를 어떻게 저장하는가? 비트와 바이트 1바이트 == 8비트 비트로 숫자를 표현할때, 최상위 비트는 부호를 의미하고, 음수를 나타..
[언리얼 MMORPG pt1] 어셈블리 언어 입문1. 환경설정 및 Hello World 1. SASM 설치 2. 환경설정에서 build -> x64, nasm 으로 설정 3. 새 프로젝트 만들기 4. 다음과 같이 입력하면 Hello World 를 출력할 수 있다. %include "io64.inc" section .text global CMAIN: CMAIN: ;write your code here PRINT_STRING msg xor rax, rax ret section .data msg db 'Hello World', 0x00 5. save .exe 하면 실행 파일로 저장도 가능하다. 2. 데이터 기초 2.1 컴퓨터는 정수를 어떻게 저장하는가? 비트와 바이트 1바이트 == 8비트 비트로 숫자를 표현할때, 최상위 비트는 부호를 의미하고, 음수를 나타..
2023.10.19