LRU Cache

In today’s computing world, efficiency is key. One of the critical components that can make your application more efficient is caching. Among various caching strategies, the Least Recently Used (LRU) cache is a popular one. In this blog, we’ll delve into what an LRU cache is, why it is useful, and how you can implement … Continue reading “LRU Cache”

Anagram In Java

 Any word or phrase that exactly reproduces the letters in another order is an anagram. Example: cat – act, study – dusty, gainly – laying etc., Logic for anagram is below:

Output:

Armstrong Number In Java

Armstrong Number is a number that is the sum of its own digits each raised to the power of the number of digits. Example: 13+53+33=153 which is same as given number 153., and 3 is the number of digits. 14+64+34+44=1634 which is same as given number 1634., and 4 is the number of digits.

Continue readingArmstrong Number In Java

Palindrome String In Java

What is Palindrome? A Palidrome string is a string where if we reverse the string, the word will be same. A palindrome is a word, number, phrase, or other sequence of characters which reads the same backward as forward. Example: madam, refer, redivider The logic in Java for implementation is very simple.,

Output: Input String: abcdcba … Continue readingPalindrome String In Java

Fibonacci series

Fibonacci Series is one of the basic questions in Java., to check the programmer has a basic understanding of logic implementation in java.In Fibonacci series, the current number is always the sum of previous two numbers.Fibonacci series is initialized with 0 & 1.0, 1, (0+1)2, (1+2)3, (2+3)5, (3+5)8, (5+8)13….

Output 0 1 1 2 … Continue readingFibonacci series