Blog Posts

How to Differentiate a Polynomial in Java

May 10, 2021

The challenge Create a function that differentiates a polynomial for a given value of x.


Read More

Find the Sums of Perfect Squares in Java

May 9, 2021

The challenge The task is simply stated. Given an integer n (3 < n < 10<sup>9</sup>), find the length of the smallest list of perfect squares which add up to n.


Read More

[Solved] Error: Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.4.4:repackage (repackage)

May 8, 2021

If you have come across this error when trying to build and deploy your Spring Boot Maven application then this post will help you!


Read More

[Solved] No main manifest attribute Solution for Jar/Maven/Gradle/Spring Boot

May 7, 2021

You’ve built a Java project and packaged a .jar file.


Read More

[Solved] Error – The following untracked working tree files would be overwritten by merge

May 6, 2021

So you just tried to do a git pull and got the following error:


Read More

How to Strip Script Tags in PHP

May 5, 2021

If you have some HTML input submitted from a user to your application, before saving it to the database, you may want to strip all <script> tags so that you can prevent cross site scripting attacks and other potential issues.


Read More

How to Make a Spiral in Java

May 4, 2021

The challenge Your task, is to create a NxN spiral with a given size.


Read More

Find the Longest Common Subsequence in Java

May 3, 2021

The challenge from Wikipedia: The longest common subsequence (LCS) problem is the problem of finding the longest subsequence common to all sequences in a set of sequences.


Read More

Find First and Last Position of Element in Sorted Array in Java

May 2, 2021

The challenge Given an array of integers nums sorted in ascending order, find the starting and ending position of a given target value.


Read More

Determine if Number is a Power of Three in Java

May 1, 2021

The challenge Given an integer n, return true if it is a power of three.


Read More

How to Count Binary Substrings in Java

April 30, 2021

The challenge Give a string s, count the number of non-empty (contiguous) substrings that have the same number of 0’s and 1’s, and all the 0’s and all the 1’s in these substrings are grouped consecutively.


Read More

How to Download a CSV file using Javascript

April 29, 2021

Ever wanted to generate a CSV (comma separated values) file directly from the browser, using Javascript?


Read More

Array Range between Integers in Java

April 28, 2021

The challenge Complete the function that takes two integers (a, b, where a < b) and return an array of all integers between the input parameters, including them.


Read More

How to clone a table structure in MySQL

April 27, 2021

I have often needed to clone a table without it’s data in MySQL.


Read More

Number of Rectangles in a Grid in Java

April 26, 2021

The challenge Given a grid of size m x n, calculate the total number of rectangles contained in this rectangle.


Read More

Longest vowel chain in Java

April 25, 2021

The challenge The vowel substrings in the word codewarriors are o,e,a,io.


Read More

Determine Unique String Characters in Java

April 24, 2021

The challenge In this challenge, you will be given two strings a and b and your task will be to return the characters that are not common in the two strings.


Read More

Difference of Volumes of Cuboids in Java

April 23, 2021

The challenge In this simple exercise, you will create a program that will take two lists of integers, a and b.


Read More

Sort by binary ones in Java

April 22, 2021

The challenge In this example you need to implement a function that sort a list of integers based on it’s binary representation.


Read More

Binomial Expansion in Java

April 21, 2021

The challenge Write a program that can do some algebra. Write a function expand that takes in an expression with a single, one character variable, and expands it.


Read More