How to Reverse a String in Golang
The challenge
Complete the solution so that it reverses the string passed into it.
'world' => 'dlrow'
'word' => …
Read Article →
In-depth guides, insights, and best practices for modern software engineering
Complete the solution so that it reverses the string passed into it.
'world' => 'dlrow'
'word' => …
Read Article →
You must implement a function that returns the difference between the biggest and the smallest value in a list(lst) received as a …
Read Article →Given a string and an array of integers representing indices, capitalize all letters at the given indices.
Example: …
Read Article →Modify the spacify function so that it returns the given string with spaces inserted between each character.
spacify("hello …
Read Article →
For a given list [x1, x2, x3, ..., xn] compute the last (decimal) digit of x1 ^ (x2 ^ (x3 ^ (... ^ xn))).
Example:
last_digit({3, 4, 2}, …
Read Article →
You are given two arrays a1 and a2 of strings. Each string is composed of letters from a to z. Let x be any string in the first array …
An array is circularly sorted if the elements are sorted in ascending order but displaced, or rotated, by any number of steps.
Complete …
Read Article →You are be given a string that has lowercase letters and numbers. Your task is to compare the number groupings and return the largest …
Read Article →Write a function toWeirdCase (weirdcase in Ruby) that accepts a string, and returns the same string with all even indexed characters in …
Finish the solution so that it sorts the passed-in array/list of numbers. If the function passes in an empty array/list or null/None …
Read Article →Write a simple regex to validate a username. Allowed characters are:
Length should be between 4 …
Read Article →Given two arrays of strings a1 and a2 return a sorted array r in lexicographical order of the strings of a1 which are substrings of …
Your task is to add up letters to one letter.
The function will be given an array of single-character Strings, each one being a letter …
Read Article →Create a function that takes a Roman numeral as its argument and returns its value as a numeric decimal integer. You don’t need to …
Read Article →Clock shows h hours, m minutes and s seconds after midnight.
Your task is to write a function that returns the time since midnight in …
Read Article →You want to create secret messages which must be deciphered.
Here are the conditions:
Write a function that takes an integer as input, and returns the number of bits that are equal to one in the binary representation of …
Read Article →Find the next higher number (int) with same ‘1’- Bits.
I.e. as much 1 bits as before and output next higher than input. Input is …
Write a function named first_non_repeating_letter that takes a string input, and returns the first character that is not repeated …
Return the last digit of the nth element in the Fibonacci sequence (starting with 1,1, to be extra clear, not with 0,1 or other …
Read Article →Write an algorithm that will identify valid IPv4 addresses in dot-decimal format. IPs should be considered valid if they consist of four …
Read Article →In this challenge, you have to write a method that folds a given array of integers by the middle x-times.
An example says more than a …
Read Article →Fmt provides printing to standard output (usually the console) and formatting of strings capabilities.
The main …
Read Article →Given a list lst and a number N, create a new list that contains each number of lst at most N times without reordering. For example if N …
Read Article →