Returning Highest and Lowest in Python
The challenge
You are given a string of space-separated numbers and have to return the highest and lowest number.
Example:
high_and_low("1 2 3 4 …
Read Article →
In-depth guides, insights, and best practices for modern software engineering
You are given a string of space-separated numbers and have to return the highest and lowest number.
Example:
high_and_low("1 2 3 4 …
Read Article →
Implement a difference function, which subtracts one list from another and returns the result.
It should remove all values from list a, …
In this challenge, your function receives an array of integers as input. Your task is to determine whether the numbers are in ascending …
Read Article →Given a string, capitalize the letters that occupy even indexes and odd indexes separately, and return as shown below. Index `` will be …
Read Article →Create a method IsUpperCase to see whether the string is ALL CAPS. For example:
type MyString string
MyString("c").IsUpperCase() …
Read Article →
In Go, there are multiple ways to make a string UpperCase, each of them are by using the strings package.
strings.ToUpper):func ToUpper(str …
Given a string of words, return the length of the shortest word(s).
The input string will never be empty and you do not need to account …
Read Article →Given an integer numRows, return the first numRows of Pascal’s triangle.
In Pascal’s triangle, each number is the sum of the …
Read Article →Your goal is to return multiplication table for number that is always an integer from 1 to 10.
For example, a multiplication table …
Read Article →Remove the left-most duplicates from a list of integers and return the result.
// Remove the 3's at indices 0 and 3
// followed by …
Read Article →
All we eat is water and dry matter.
John bought potatoes: their weight is 100 kilograms. Potatoes contain water and dry matter.
The …
Read Article →The input is a string str of digits. Cut the string into chunks (a chunk here is a substring of the initial string) of size sz (ignore …