# Extract Unique characters
# Send Feedback
# Given a string S, you need to remove all the duplicates. That means, the output string should contain each character only once. The respective order of characters should remain same, as in the input string.
# Input format:
# The first and only line of input contains a string, that denotes the value of S.
# Output format :
# The first and only line of output contains the updated string, as described in the task.
# Constraints :
# 0 <= Length of S <= 10^8
# Time Limit: 1 sec
# Sample Input 1 :
# ababacd
# Sample Output 1 :
# abcd
# Sample Input 2 :
# abcde
# Sample Output 2 :
# abcde




# Longest Consecutive Sequence
# Send Feedback
# You are given an array of unique integers that contain numbers in random order. You have to find the longest possible sequence of consecutive numbers using the numbers from given array.
# You need to return the output array which contains starting and ending element. If the length of the longest possible sequence is one, then the output array must contain only single element.
# Note:
# 1. Best solution takes O(n) time.
# 2. If two sequences are of equal length, then return the sequence starting with the number whose occurrence is earlier in the array.
# Input format:
# The first line of input contains an integer, that denotes the value of the size of the array. Let us denote it with the symbol n.
# The following line contains n space separated integers, that denote the value of the elements of the array.
# Output format:
# The first and only line of output contains starting and ending element of the longest consecutive sequence. If the length of longest consecutive sequence, then just print the starting element.
# Constraints :
# 0 <= n <= 10^6
# Time Limit: 1 sec
# Sample Input 1 :
# 13
# 2 12 9 16 10 5 3 20 25 11 1 8 6 
# Sample Output 1 :
# 8 12 
# Sample Input 2 :
# 7
# 3 7 2 1 9 8 41
# Sample Output 2 :
# 7 9
# Explanation: Sequence should be of consecutive numbers. Here we have 2 sequences with same length i.e. [1, 2, 3] and [7, 8, 9], but we should select [7, 8, 9] because the starting point of [7, 8, 9] comes first in input array and therefore, the output will be 7 9, as we have to print starting and ending element of the longest consecutive sequence.
# Sample Input 3 :
# 7
# 15 24 23 12 19 11 16
# Sample Output 3 :
# 15 16



# Pairs with difference K
# Send Feedback
# You are given with an array of integers and an integer K. You have to find and print the count of all such pairs which have difference K.
# Note: Take absolute difference between the elements of the array.
# Input Format:
# The first line of input contains an integer, that denotes the value of the size of the array. Let us denote it with the symbol n.
# The following line contains n space separated integers, that denote the value of the elements of the array.
# The following line contains an integer, that denotes the value of K.
# Output format :
# The first and only line of output contains count of all such pairs which have an absolute difference of K. 
# Constraints :
# 0 <= n <= 10^4
# Time Limit: 1 sec
# Sample Input 1 :
# 4 
# 5 1 2 4
# 3
# Sample Output 1 :
# 2
# Sample Input 2 :
# 4
# 4 4 4 4 
# 0
# Sample Output 2 :
# 6





# Longest subset zero sum
# Send Feedback
# Given an array consisting of positive and negative integers, find the length of the longest subarray whose sum is zero.
# Input Format:
# The first line of input contains an integer, that denotes the value of the size of the array. Let us denote it with the symbol N.
# The following line contains N space separated integers, that denote the value of the elements of the array.
# Output Format
# The first and only line of output contains length of the longest subarray whose sum is zero.
# Constraints:
# 0 <= N <= 10^8
# Time Limit: 1 sec
# Sample Input 1:
# 10 
#  95 -97 -387 -435 -5 -70 897 127 23 284
# Sample Output 1:
# 5
# Explanation:
# The five elements that form the longest subarray that sum up to zero are: -387, -435, -5, -70, 897 

