Longest necklace codility BUT, there has to be an even amount of alpha and an odd number of digits. Solutions for Codility problems, written in C++ and in Python. com/demo/take-sample-test/longest_password/ Question Name: Longest-Password or LongestPassword. The Problem. You can assume that if there are K spaces in string S then there are exactly K + 1 words. SHOULD, MUST, CAN, MAY, ATLEAST, ATMOST in problem statement can be easily missed and will leave you feeling dumb. For example, given "test 5 a0A pass007 ?xy1", there are five words and three of them are valid passwords: "5", "a0A" and "pass007". . Sep 22, 2016 · Question: https://codility. Aug 9, 2017 · Codility's Longest Password. The solution could be more Pythonic with some additional space. I got 100% but to see that result you Find the maximum depth of water in mountains after a huge rainfall. Write a function that, given a positive integer n, returns the length of its longest binary gap. Information about upcoming challenges, solutions and lessons directly in your inbox. We only need to find the valid password within a string that is supplied for us. (100% performance) Topics The goal is to choose the longest word that is a valid password. The function should return 0 if n doesn’t contain a binary gap. Given a sequence, find the longest subsequence that can be decomposed into at most three monotonic parts. qbutprgxsxvrytgjewfajzboluildywbyvreifdtxmdijnpg