본문 바로가기

CodeSignal42

CodeSignal [48/60] isDigit Problem: Determine if the given character is a digit or not. Example For symbol = '0', the output should be isDigit(symbol) = true; For symbol = '-', the output should be isDigit(symbol) = false. -Summary- 1. Python 의 isdigit()함수로 바로 풀수 있다. 모든 문제에 대한 저작권은 CodeSignal 회사에 있습니다. [Copyright © 2020 BrainFights Inc. All rights reserved] https://codesignal.com/ 2020. 5. 27.
CodeSignal [47/60] isMAC48Address Problem: A media access control address (MAC address) is a unique identifier assigned to network interfaces for communications on the physical network segment. The standard (IEEE 802) format for printing MAC-48 addresses in human-friendly form is six groups of two hexadecimal digits (0 to 9 or A to F), separated by hyphens (e.g. 01-23-45-67-89-AB). Your task is to check by given string inputStri.. 2020. 5. 27.
CodeSignal [46/60] electionsWinners Problem: Elections are in progress! Given an array of the numbers of votes given to each of the candidates so far, and an integer k equal to the number of voters who haven't cast their vote yet, find the number of candidates who still have a chance to win the election. The winner of the election must secure strictly more votes than any other candidate. If two or more candidates receive the same .. 2020. 5. 27.
CodeSignal [45/60] buildPalindrome Problem: Given a string, find the shortest possible string which can be achieved by adding characters to the end of initial string to make it a palindrome. Example For st = "abcdc", the output should be buildPalindrome(st) = "abcdcba". -Summary- 1. loop 을 돌며, i 부터 끝 index의 string이 palindrom 인지 아닌지를 확인한다. 2. 만약 palindrom이 아니라면 palindrom 이 나올때까지 search 한다. 3. palindrom substring을 만나면, nonPalindrom.. 2020. 5. 27.
CodeSignal [44/60] findEmailDomain Problem: An email address such as "John.Smith@example.com" is made up of a local part ("John.Smith"), an "@" symbol, then a domain part ("example.com"). The domain name part of an email address may only consist of letters, digits, hyphens and dots. The local part, however, also allows a lot of different special characters. Here you can look at several examples of correct and incorrect email addr.. 2020. 5. 26.
CodeSignal [43/60] isBeautifulString Problem: A string is said to be beautiful if each letter in the string appears at most as many times as the previous letter in the alphabet within the string; ie: b occurs no more times than a; c occurs no more times than b; etc. Given a string, check whether it is beautiful. Example For inputString = "bbbaacdafe", the output should be isBeautifulString(inputString) = true. This string contains .. 2020. 5. 26.