본문 바로가기

Problem Solving/Codility27

[Python] LongestPassword https://app.codility.com/demo/results/trainingPB6C9Y-2CD/ Test results - Codility You would like to set a password for a bank account. However, there are three restrictions on the format of the password: it has to contain only alphanumerical characters (a−z, A−Z, 0−9); there should be an even number of letters; there should be an app.codility.com Point 제시된 조건에 따라 validation check를 수행한다 스플릿 하여 fo.. 2021. 7. 18.
[Python] TreeHeight https://app.codility.com/demo/results/trainingMGZBGQ-R79/ Test results - Codility In this problem we consider binary trees, represented by pointer data structures. A binary tree is either an empty tree or a node (called the root) consisting of a single integer value and two further binary trees, called the left subtree and the right sub app.codility.com Point dfs를 이용해서 height(depth)를 카운트한다 Tip 탈.. 2021. 7. 18.
[Python] StrSymmetryPoint https://app.codility.com/demo/results/trainingYMXCBY-VNE/ Test results - Codility Write a function: def solution(S) that, given a string S, returns the index (counting from 0) of a character such that the part of the string to the left of that character is a reversal of the part of the string to its right. The function should return − app.codility.com Point center point까지 start와 end를 반복문을 통해 비교해.. 2021. 7. 18.
[Python] FirstUnique https://app.codility.com/demo/results/training5MBAYJ-A83/ Test results - Codility A non-empty array A consisting of N integers is given. The unique number is the number that occurs exactly once in array A. For example, the following array A: A[0] = 4 A[1] = 10 A[2] = 5 A[3] = 4 A[4] = 2 A[5] = 10 contains two unique numbers (5 and 2). Y app.codility.com Point 딕셔너리를 만들어 입력값에 대해 카운트를 한다 딕셔너리 for l.. 2021. 7. 15.
[Python] DisappearingPairs https://app.codility.com/demo/results/trainingFRJG6A-A4D/ Test results - Codility A string S containing only the letters "A", "B" and "C" is given. The string can be transformed by removing one occurrence of "AA", "BB" or "CC". Transformation of the string is the process of removing letters from it, based on the rules described above. A app.codility.com Point 전형적인 stack과 관련된 알고리즘 입력값과 stack의 가장 .. 2021. 7. 15.
[Python] 8.1. Dominator https://app.codility.com/demo/results/trainingKJKX8S-C3B/ Test results - Codility An array A consisting of N integers is given. The dominator of array A is the value that occurs in more than half of the elements of A. For example, consider array A such that A[0] = 3 A[1] = 4 A[2] = 3 A[3] = 2 A[4] = 3 A[5] = -1 A[6] = 3 A[7] = 3 The dom app.codility.com Task Score 100% Correctness 100% Performan.. 2021. 4. 5.
[Python] 7.3. Nesting app.codility.com/demo/results/training6WQ7HN-NGN/ Test results - Codility A string S consisting of N characters is called properly nested if: S is empty; S has the form "(U)" where U is a properly nested string; S has the form "VW" where V and W are properly nested strings. For example, string "(()(())())" is properly nested but app.codility.com Task Score 100% Correctness 100% Performance 100% .. 2021. 3. 30.
[Python] 7.2. Fish app.codility.com/demo/results/trainingWVD5AJ-4CG/ Test results - Codility You are given two non-empty arrays A and B consisting of N integers. Arrays A and B represent N voracious fish in a river, ordered downstream along the flow of the river. The fish are numbered from 0 to N − 1. If P and Q are two fish and P < Q, then fish app.codility.com Task Score 100% Correctness 100% Performance 100% De.. 2021. 3. 29.
[Python] 7.1. Brackets https://app.codility.com/demo/results/trainingU6MG2S-N29/ Test results - Codility A string S consisting of N characters is considered to be properly nested if any of the following conditions is true: S is empty; S has the form "(U)" or "[U]" or "{U}" where U is a properly nested string; S has the form "VW" where V and W are properly nes app.codility.com Task Score 100% Correctness 100% Performan.. 2021. 3. 27.
728x90
반응형