HashMap methods Java

HashMap Class in Java stores the data in the form of key-value pairs where the key data should be unique. We can access the values based on the corresponding key data. HashMap is present in Java’s Collection framework and is part of java.util package. It works on the principle of …

Read more

Kth Non-repeating Character

Problem Statement In the “Kth Non-repeating Character” we have given a string “s”. Write a program to find out the kth non-repeating_character. If there are less than k character which is non-repeating in the string then print “-1”. Input Format The first and only one line containing a string “s”. …

Read more