Blog: Lessons4Devs 
210 blogs
updated: 7 min. ago


Searching
Cyclically Sorted Array Smallest Element Find the index of the smallest element in a cyclically sorted array (cyclically sorted means that i...




Some Heap applications
Sort an almost sorted array Write a program which takes as input a very long sequence of numbers and prints the numbers in sorted order. Eac...


Important Binary Tree algorithms
Maximum Depth of Binary Tree Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path fr...


Finding Anagrams
I came up with a new solution I guess. It uses the Fundamental Theorem of Arithmetic. So the idea is to use an array of the first 26 prime n...


Java 8 useful snippets
Counting the number of occurrences of words in a string array: Map counted = Stream.of(arrayOfStrings) .collect(Collectors.group ingBy(Funct...


365 Problem Solving challenge
I will try to solve as many problems on Hacker Rank (or just any problem) as possible during a 1 year period (07 June 2020 / 07 June 2021). ...


Fedora 26 Install Guest Additions (VirtualBox)
sudo dnf update kernel* sudo dnf install dkms kerneldevel Insert VirtualBox guest additions cd /run/media/username/VBOXA DDITIONS_xxx/ sudo...




[JAXRS] Use @Provider to leverage JAXRS provider autodiscovery feature.
There are at least 2 ways to register a JAXRS resource such as a set of web methods or the filters. 1. The first and the verbose way is to ...

