This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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++) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(":"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
void shellsort(int *arr,int n) | |
{ | |
int gap,j,temp,i; | |
gap=n/2; | |
while(gap>0) | |
{ | |
i=0; | |
j=gap; |