## Sort a Java Integer in Descending Order

The challenge Your task is to make a function that can take any non-negative integer as an argument and return it with its digits in… Read More »Sort a Java Integer in Descending Order

## Get the Sum of Digits / Digital Root using Java

The challenge Digital root is the recursive sum of all the digits in a number. Given n, take the sum of the digits of n. If that value has… Read More »Get the Sum of Digits / Digital Root using Java

## How to write a Chain Adding Function in Python

The challenge We want to create a function that will add numbers together when called in succession. We also want to be able to continue… Read More »How to write a Chain Adding Function in Python

## Solving Tribonacci Sequence with Python

The challenge As the name may already reveal, it works basically like a Fibonacci, but summing the last 3 (instead of 2) numbers of the… Read More »Solving Tribonacci Sequence with Python

## The Casino Chips Problem Solved with Python

The challenge You are given three piles of casino chips: white, green and black chips: the first pile contains only white chips the second pile… Read More »The Casino Chips Problem Solved with Python

## Check if Isogram using Python

The challenge An isogram is a word that has no repeating letters, consecutive or non-consecutive. Implement a function that determines whether a string that contains… Read More »Check if Isogram using Python

## Find the Longest Common Prefix using Python

The challenge Write a function to find the longest common prefix string amongst an array of strings. If there is no common prefix, return an… Read More »Find the Longest Common Prefix using Python

## Count and Say with Python

The challenge he count-and-say sequence is the sequence of integers with the first five terms as following: 1. 1 2. 11 3. 21 4. 1211… Read More »Count and Say with Python

## The Plus One problem solved with Python

The challenge Given a non-empty array of digits representing a non-negative integer, increment one to the integer. The digits are stored such that the most significant digit is at… Read More »The Plus One problem solved with Python

## Solving the Single Number problem in Python

The challenge Given a non-empty array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runtime complexity. Could… Read More »Solving the Single Number problem in Python

## Rotate a Matrix List in Python

The challenge You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise). Note: You have to rotate the image in-place, which… Read More »Rotate a Matrix List in Python

## Check if Valid Sudoku Blocks in Java

The challenge of solving valid Sudoku blocks Determine if a 9×9 Sudoku board is valid. Only the filled cells need to be validated according to the following rules: Each… Read More »Check if Valid Sudoku Blocks in Java

## Find the Intersection of Two Arrays in Python

The challenge Given two arrays, write a function to compute their intersection. Example 1: Input: nums1 = [1,2,2,1], nums2 = [2,2] Output: [2,2] Example 2:… Read More »Find the Intersection of Two Arrays in Python

## Rotate an Array K Times in Python

The challenge Given an array, rotate the array to the right by k steps, where k is non-negative. Example 1: Input: nums = [1,2,3,4,5,6,7], k = 3 Output: [5,6,7,1,2,3,4]… Read More »Rotate an Array K Times in Python

## FizzBuzz in Java

The challenge Write a program that outputs the string representation of numbers from 1 to n. But for multiples of three it should output “Fizz” instead… Read More »FizzBuzz in Java

## Python Splices reimplemented in Java

Python has a fantastic feature called slices. It allows you to work with a list, set or string by it’s index items. E.g.: You can… Read More »Python Splices reimplemented in Java

## Solving Two Sum in Python

The challenge Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each… Read More »Solving Two Sum in Python

## Get the Next Small Integer in Python

The challenge Write a function: def solution(A) that, given an array A of N integers, returns the smallest positive integer (greater than 0) that does… Read More »Get the Next Small Integer in Python

## Is a Valid Palindrome with Java

The challenge Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. Note: For the purpose of this problem, we… Read More »Is a Valid Palindrome with Java

## Is a Valid Anagram with Java

The challenge Given two strings s and t , write a function to determine if t is an anagram of s. Example 1: Input: s = “anagram”, t = “nagaram” Output: true… Read More »Is a Valid Anagram with Java

## How to ReImplement strStr() in Java

What we want to achieve Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. Example 1:… Read More »How to ReImplement strStr() in Java

## Third Maximum Number with Java

The challenge Given a non-empty array of integers, return the third maximum number in this array. If it does not exist, return the maximum number. The time complexity must… Read More »Third Maximum Number with Java

## First Unique Character in a String using Java

The challenge Given a string, find the first non-repeating character in it and return its index. If it doesn’t exist, return -1. Examples: s =… Read More »First Unique Character in a String using Java