Blog Posts

How to check if a file exists in Go

November 6, 2021

If you need to check if a file exists using Go, then you can use one of the following methods, depending on the version of Go you may be using.


Read More

How to convert a string value to an int in Go

November 5, 2021

If you need to convert a string to an int in Go, then you should use the strconv.


Read More

How to convert an int value to string in Go

November 4, 2021

If you need to convert an int to a string in Go, then you should use the strconv.


Read More

How to Efficiently Concatenate Strings in Go

November 3, 2021

If you are using a version of Go >= 1.10, then you should be using the newer strings.


Read More

How to check if a map contains a key in Go

November 2, 2021

If you have a map in Go and want to only perform an action if it contains a certain key, then you can do so easily:


Read More

How to Remove all Vowels from a String in Java

November 1, 2021

The challenge Remove all vowels from the string. Vowels: a e i o u A E I O U The solution in Java code Option 1:


Read More

How to Loop Forever in Golang

October 31, 2021

If you need to loop forever, or infinitely, in your Go code, then you have 2 options:


Read More

Understanding For Loops in Golang

October 30, 2021

In Golang a for loop is a way to loop through an iterable.


Read More

[Solved] go mod init: modules disabled by GO111MODULE=off

October 29, 2021

You’ve probably just tried to initialise a new Go module, and received the following error:


Read More

How to UpperCase the start of each Word in a String in Golang

October 28, 2021

The challenge The task is to take a string of lower-cased words and convert the sentence to upper-case the first letter/character of each word


Read More

How to Solve Max-Min Arrays in Java

October 27, 2021

The challenge You are given an array of unique elements, and your task is to rearrange the values so that the first max value is followed by the first minimum, followed by second max value then second min value, etc.


Read More

How to Find the Smallest Integer in the Array in Golang

October 26, 2021

The challenge Given an array of integers your solution should find the smallest integer.


Read More

How to do Basic Encryption in Java

October 25, 2021

The challenge The most basic encryption method is to map a char to another char by a certain math rule.


Read More

Forming Unique Array Combinations in Golang

October 24, 2021

The challenge You are given an array of arrays and your task will be to return the number of unique arrays that can be formed by picking exactly one element from each subarray.


Read More

How to Check if String is a Palindrome in Python

October 23, 2021

The challenge Write a function that checks if a given string (case insensitive) is a palindrome.


Read More

How to Find the Squares in Java

October 22, 2021

The challenge Complete the function that takes an odd integer (0 < n < 1000000) which is the difference between two consecutive perfect squares, and return these squares as a string in the format "bigger-smaller".


Read More

How to Get Longest Word in Sentence in Java

October 21, 2021

The challenge When given a string of space-separated words, return the word with the longest length.


Read More

How to Sum all the Integers in a String in Golang

October 20, 2021

The challenge Implement a function that calculates the sum of the integers inside a string.


Read More

How to Reverse a String in Golang

October 19, 2021

The challenge Complete the solution so that it reverses the string passed into it.


Read More

Maximum Different of Int-Array in Java

October 18, 2021

The challenge You must implement a function that returns the difference between the biggest and the smallest value in a list(lst) received as a parameter.


Read More