How to Find the Longest Substring in Alphabetical Order in Python
The challenge
Find the longest substring in alphabetical order.
Example:
the longest alphabetical substring in "asdfaaaabbbbcttavvfffffdf" …
320 articles about python development, tools, and best practices
Find the longest substring in alphabetical order.
Example:
the longest alphabetical substring in "asdfaaaabbbbcttavvfffffdf" …
Write a function that takes in a binary string and returns the equivalent decoded text (the text is ASCII encoded).
Each 8 bits on the …
Read Article →Given a triangle of consecutive odd numbers:
1
3 5
7 9 11
13 15 17 19
21 23 …
Read Article →
Write a function that takes a shuffled list of unique numbers from 1 to n with one element missing (which can be any number including n …
Given an integer as input, can you round it to the next (meaning, “higher”) multiple of 5?
Examples:
input: output:
0 …
Read Article →
Wilson primes satisfy the following condition. Let P represent a prime number.
Then ((P-1)! + 1) / (P * P) should give a whole number. …
Christmas is coming and many people dreamed of having a ride with Santa’s sleigh. But, of course, only Santa himself is allowed to …
Read Article →Return a new array consisting of elements which are multiple of their own index in input array (length > 1).
Examples:
[22, -6, 32, …
Read Article →When provided with a letter, return its position in the alphabet.
Input :: “a”
Ouput :: “Position of alphabet: …
Read Article →The make_looper() function takes a string (of non-zero length) as an argument. It returns a function. The function it returns will …
In this challenge, you will make a function that converts between camelCase, snake_case, and kebab-case.
You must write a function that …
Read Article →Create a function, that accepts an arbitrary number of arrays and returns a single array generated by alternately appending elements …
Read Article →