Breaking
Tag

## Fundamentals

Browsing

A palindrome is a word or number or sentence which reads the same backward or forward. Write a program to check palindrome string using queue data structure.

The queue is a data structure which process items using first in first out (FIFO) strategy. The queue has head and tail nodes. When the item inserts into the queue, the queue adds the items in the tail. The linked list store the next element address to the current node for identifying the next node. The last element linked list next node store NULL address.

A priority queue is a data structure with each element has a priority associated with it. The high priority element served before an element with low priority. Priority queue provides extra flexibility over sorting and quick access to the smallest and largest key in the queue.

The queue is an abstract data type, in which the element is inserted into the tail, and delete from the head. It stores the items using First in first out principle (FIFO). The queue can be implemented using an array or linked list. The enqueues insert an item to the tail. The dequeue removes the item from the head.

coding interview questions part 2
subsets With Duplicate
Reverse Integer is Prime Power Palindrome Number

Armstrong Number An Armstrong Number is a number that is the sum of its own digits each raised to the power of the number of digitsArmstrong numbers are those numbers in which sum of cube of all digits provides the same number.Example:-1531^3 = 15^3 = 1253^3 = 271^3 + 5^3 + 3^3= 1 + 125 + 27= 153 Source Code package com.dsacode.Probelms; public class ArmstrongNumer { public static boolean isArmStrong(int num) { int result = 0; int orig = num; while(num != 0){ int remainder = num%10; result = result + remainder*remainder*remainder; num = num/10; } if(orig == result){ return…

Radix sort is a linear sorting algorithm that sorts data with integer keys by grouping keys by the individual digits which share the same significant position and value.

Least Significant Digit (LSD) radix sort process the integer representations starting from the least digit and moves towards the most significant digit. Radix sort is a linear sorting algorithm that sorts data with integer keys by grouping keys by the individual digits which share the same significant position and value.

Priority queue insert smallest key value is at the front of the queue (Min heap). Write a program to implement min heap priority queue.

Priority queues insert the largest key value at the front of the queue (max heap). Write a program to implement max heap priority queue.