Leetcode solution of problem 217 in java

Contains Duplicate Given an integer array nums, return true if any value appears at least twice in the array, and return false if every element is distinct. The above problem is taken from the below mentioned link:- Leetcode Problem Approach:- Use of HashSet data structure will solve the problem. Here Set is chosen as it…

Algorithm to check if a String has all unique characters in java

This is a very common interview questions asked by many interviewer in SDET and SET interviews. At the very first, clear with the interviewer about the characters that the given string can hold. Here we are assuming that the string can contain ASCII characters with value from 1 to 128. Aproach:- So, at the very…