coding test
-
[HackerRank] Simple Text Editor c++Coding Test/HackerRank 2023. 5. 17. 09:46
Problem Simple Text Editor | HackerRank Implement a simple text editor and perform some number of operations. www.hackerrank.com Sample Input STDIN Function ----- -------- 8 Q = 8 1 abc ops[0] = '1 abc' 3 3 ops[1] = '3 3' 2 3 ... 1 xy 3 2 4 4 3 1 Sample Output c y a Explanation Initially, S is empty. The following sequence of 8 operations are described below: Solutions stack을 사용하여 푸는 문제 유형입니다. 4..
-
[프로그래머스] 성격 유형 검사하기 c++Coding Test/programmers 2022. 8. 19. 17:33
문제 설명 나만의 카카오 성격 유형 검사지를 만들려고 합니다. 성격 유형 검사는 다음과 같은 4개 지표로 성격 유형을 구분합니다. 성격은 각 지표에서 두 유형 중 하나로 결정됩니다. 지표 번호 성격 유형 1번 지표 라이언형(R), 튜브형(T) 2번 지표 콘형(C), 프로도형(F) 3번 지표 제이지형(J), 무지형(M) 4번 지표 어피치형(A), 네오형(N) survey 원소에 따라 점수 배치가 달라진다. "AN" → 선택지 성격 유형 점수 매우 비동의 어피치형 3점 비동의 어피치형 2점 약간 비동의 어피치형 1점 모르겠음 어떤 성격 유형도 점수를 얻지 않습니다 약간 동의 네오형 1점 동의 네오형 2점 매우 동의 네오형 3점 "NA" → 선택지 성격 유형 점수 매우 비동의 네오형 3점 비동의 네오형 2점 ..
-
[HackerRank] Zig Zag Sequence C++Coding Test/HackerRank 2022. 7. 20. 14:54
Problem In this challenge, the task is to debug the existing code to successfully execute all provided test files. Given an array of N distinct integers, transform the array into a zig zag sequence by permuting the array elements. A sequence will be called a zig zag sequence if the first K elements in the sequence are in increasing order and the last K elements are in decreasing order, where k =..
-
[HackerRank] counting sort 1 c++Coding Test/HackerRank 2022. 7. 20. 10:29
Problem Quicksort usually has a running time of n x log(n), but is there an algorithm that can sort even faster? In general, this is not possible. Most sorting algorithms are comparison sorts, i.e. they sort a list just by comparing the elements to one another. A comparison sort algorithm cannot beat n x log(n) (worst-case) running time, since n x log(n) represents the minimum number of comparis..
-
[HackerRank] Between Two Sets c++Coding Test/HackerRank 2022. 7. 19. 23:18
Problem There will be two arrays of integers. Determine all integers that satisfy the following two conditions: The elements of the first array are all factors of the integer being considered The integer being considered is a factor of all elements of the second array These numbers are referred to as being between the two arrays. Determine how many such numbers exist. Example a = [2, 6] b = [24,..
-
[HackerRank] Compare the Triplets c++Coding Test/HackerRank 2022. 7. 18. 13:57
Problem Alice and Bob each created one problem for HackerRank. A reviewer rates the two challenges, awarding points on a scale from 1 to 100 for three categories: problem clarity, originality, and difficulty. The rating for Alice's challenge is the triplet a = (a[0], a[1], a[2]), and the rating for Bob's challenge is the triplet b = (b[0], b[1], b[2]). The task is to find their comparison points..