How to Find the Sum of Prime-Indexed Elements in Go
The challenge
You will be given an integer array and your task is to return the sum of elements occupying prime-numbered indices.
The first element of …
Read Article →129 articles about go development, tools, and best practices
You will be given an integer array and your task is to return the sum of elements occupying prime-numbered indices.
The first element of …
Read Article →What is your favourite day of the week? Check if it’s the most frequent day of the week in the year.
You are given a year as …
Read Article →In this challenge, you will be given a string with brackets and an index of an opening bracket and your task will be to return the index …
Read Article →Write a function, called sumPPG
, that takes two NBA player objects/struct/Hash/Dict/Class and sums their PPG
iverson := NBAPlayer{ …
!-->
Read Article →
You will be given a number n
(where n >= 1
) and your task is to find n
consecutive odd numbers whose sum is exactly the cube of n
. …
You need to create a function that will validate if given parameters are valid geographical coordinates.
Valid coordinates look like the …
Read Article →ISBN-10 identifiers are ten digits long. The first nine characters are digits 0-9
. The last digit can be 0-9
or X
, to indicate a value …
A Noun Phrase is a phrase that can be replaced by a pronoun [he/she/it].
For example, in the sentence:
a girl ate the cookie
“A …
Read Article →Write function MaxRot(n)
which given a positive integer n
returns the maximum number you got doing rotations similar to the above …
Find the total sum of internal angles (in degrees) in an n-sided simple polygon.
N
will be greater than 2.
Option …
Read Article →It’s possible to stop a Goroutine by sending a value into it via a signal channel
:
exit := make(chan bool)
go func() {
for {
select …
Read Article →
Complete the method which returns the number which is most frequent in the given input array. If there is a tie for the most frequent …
Read Article →