Calling `Thread.sleep`

method is the most popular approach when a Java programmer wants to suspend the current thread for a specific time.

Continue reading Java Coding Tip – Thread.sleep

# Tag: coding

## Optimizing Bubble Sort in Java

By looking at the “classical” Bubble sort there can be found that the original algorithm is so unoptimized.

## Bubble sort in Java

Simple Java implementation of the **Bubble sort** algorithm.

## Java check or set read only file

Let’s consider a java code for testing if a file is read-only and setting it writable if it is possible.

## Binary to Decimal java conversion

This is a simple Java implementation of Binary to Decimal number conversion.

## Fisher-Yates shuffle java example

Simple java implementation of “Fisher-Yates shuffle” algorithm with modification from Richard Durstenfeld. Also, this algorithm was popularized by Donald Knuth as “Algorithm P (Shuffling)” or “Knuth shuffle”.

## LeetCode solution – 4Sum

This is my solution to the LeetCode problem – 4Sum.

## LeetCode solution – Longest Substring Without Repeating Characters

This is my solution to LeetCode problem – Longest Substring Without Repeating Characters.

Difficuly: medium.

Continue reading LeetCode solution – Longest Substring Without Repeating Characters

## LeetCode solution – Rotate Image

This is my own solution to the LeetCode problem – Rotate Image.

Difficulty: medium.

## LeetCode solution – Diameter of Binary Tree

This is my solution to the LeetCode problem – Diameter of Binary Tree.

Continue reading LeetCode solution – Diameter of Binary Tree