Creating a Multiplication Table for a Number in Golang
The challenge
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 →In-depth guides, insights, and best practices for modern software engineering
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 …
Coroutines are a way to handle multithreading in Kotlin, read more about it from the official docs: …
Read Article →val pair: Pair<String, Int> = "myKey" to 2
A utility class when you want to return 2 values that are not related …
Read Article →Given a month as an integer from 1 to 12, return to which quarter of the year it belongs as an integer number.
For example: month 2 …
Read Article →Create a function that takes 2 nonnegative integers in form of a string as an input, and outputs the sum (also as a string):
Example: ( …
Read Article →If you have gotten this error before, then you have been trying to implement a rowData mapping onto Ag-Grid.. and failed!
ImmutableService requires …
If you have accidentally committed the wrong files into Git, but haven’t yet pushed it to the server, you can recover, or undo your commit as …
Read Article →There are times when you need to extract an object into a number of variables.
Let’s take the example below:
val (id, name, position, …
Read Article →
Everyone knows passphrases. One can choose passphrases from poems, songs, movies names and so on but frequently they can be guessed due …
Read Article →Unit corresponds to the void keyword in Java.
Unit in Kotlin?If you have a function that does not return a value, you can return a Unit …
Functions are reusable pieces of code, often called Blocks, that as the name suggests, act as building blocks to piece together a program.
Each …
Read Article →Among all the many keywords that Kotlin comes with, there exists val and var. What are they used for? What are the differences, and why would you use …
If you have an Ag-Grid, and want to automatically resize all the columns to fit the width of the viewport, you can use this hack.
The easiest way to get the content of all rows’ data, back into a Javascript/Typescript array, is as follows.
Simply create a blank array, then …
Read Article →You are given an m x n binary matrix grid. An island is a group of 1‘s (representing land) connected 4-directionally (horizontal or …
Apache POI provides a mechanism to work with Excel documents.
However, it has a missing feature when you want to only create a new sheet if one with …
Read Article →Automatons, or Finite State Machines (FSM), are extremely useful to programmers when it comes to software design. You will be given a …
Read Article →You are given a string of n lines, each substring being n characters long. For example:
s = "abcd\nefgh\nijkl\nmnop"
We will …
Read Article →I will give you an integer. Give me back a shape that is as long and wide as the integer. The integer will be a whole number between 1 …
Read Article →Complete the solution so that it returns true if the first argument(string) passed in ends with the 2nd argument (also a string). …
Read Article →Git submodules are a way of including another repository’s code into an existing codebase, without associating it’s code or tracking …
Read Article →