Java program to calculate the frequency of the string using HashMap is given below. In this program we first created a HashMap wherer string is the key and its number of occurrence is value.
Python program to reverse a singly linked list is given below along with the output. Linked List questions are so often to be asked in the interviews of many tech giants.
Breadth First Search (BFS) algorithm is used to traverse a graph in a breadthward motion. BFS Algorithm use data structure queue to remember to get the next vertex to start the search and we will requred an array to keep the track of vertex that it is visited or unvisited.
First of all you have to setup environment to send a mail using JavaMail API. You have to download some jar files and them to the CLASSPATH. steps are given below.
Unlike C++, Java doesn't support default copy constructor, But you can write your own copy constructor in Java. Java program to explain the copy constructor is given below.
There are three methods available in Java to print the exception messages. Those three methods are the member of Throwable class. These three methods can be used to print the exception message for any exception object because Throwable class is the base class for all exceptions.
The array_sum() function is an inbuilt function in PHP. This function is used to calculate the sum of the elements of an array.
In this question an array of positive and negative integers is given to you. You have to find the maximum product of subarray. C++ complete program to get the maximum product subarray is given below.
Python keywords are the those reserved words in python which cannot be used as an identifier, function or variable name. These keywords are reserved ones. They have their own pre-defined behavior.
C++ Program for reverse level order traversal is given below. Approach is simple do the breadth first search of the binary tree and store the data value of each node in the stack. Then simply pop out the element from the stack and print out it.