Skip to content

Instantly share code, notes, and snippets.

View setanjan123's full-sized avatar

Setanjan Roy setanjan123

  • India
View GitHub Profile
public String eliminateDuplicates(String in)
{
HashSet<String> set=new HashSet<String>();
String out="";
for(int i=0;i<in.length();i++)
{
String ch=in.substring(i,i+1);
if(!set.contains(ch))
{
out=out+ch;
#include<stdio.h>
int main()
{
int arr[]={3,1,2,4,6,9,8,5,7};
int arr2[9];
int k=4,i,j,temp,l=0;
for(i=0;i<9;i++)
{
for(j=0;j<9-i;j++)
{
import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;
public class Solution {
static String timeConversion(String s) {
String time[]=s.split(":");
#include<stdio.h>
void shellsort(int *arr,int n)
{
int gap,j,temp,i;
gap=n/2;
while(gap>0)
{
i=0;
j=gap;