Valizada's blog

Java - how to transform Array to linked list

July 18, 2020Java 1 Min Read

A simple demo of creating linked list from array

Java how to transform HashSet to ArrayList

July 18, 2020Java 1 Min Read

The below code snippet demonstrates how to transform a set collection to list. Simply pass a set in constructor of List:

Java - sort two dimensional array with Stream API

July 18, 2020Java 1 Min Read

Use stream api to quickly sort a 2D array in Java.

35. Search Insert Position - June day 10

June 10, 2020Leetcode / Algorithms 1 Min Read

Link to leetcode problem definition Given a sorted array and a target value, return the index if the target is found. If not, return the…

226. Invert Binary Tree - June day 1

June 07, 2020Leetcode / Algorithms 2 Min Read

Inspiration of this problem comes from Max Howel's interview experience with Google described in this tweet. Lets jump to the problem The…

406. Queue Reconstruction by Height - June day 6

June 07, 2020Leetcode 1 Min Read

Link to leedcode problem definition Suppose you have a random list of people standing in a queue. Each person is described by a pair of…

344. Reverse String - June day 4

June 07, 2020Leetcode / Algorithms 1 Min Read

link to leedcode problem definition Write a function that reverses a string. The input string is given as an array of characters char[]. Do…