<commit_before>package Warmup;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;

public class _37makeItAnagram {
	public static void main(String[] args) throws Exception {
		BufferedReader scanner=new BufferedReader(new InputStreamReader(System.in));
		String firstLine=(scanner.readLine());
		String secondLine=(scanner.readLine());
		char[] chars = firstLine.toCharArray();
		Arrays.sort(chars);
		firstLine = new String(chars);
		chars = secondLine.toCharArray();
		Arrays.sort(chars);
		secondLine = new String(chars);



		int deletionCount=0;
		String mainString=firstLine;
		String comparisonString=secondLine;

		int firstStringCounter=0,secondStringCounter=0;
		while(firstStringCounter!=firstLine.length() && secondStringCounter!=secondLine.length()){
			//choose a main string,if its char at its ocunter is > another stig char at its counter,flip,
			//else if its less,delte,else if equal increase counter
			System.out.println(mainString+" "+firstStringCounter);
			System.out.println(comparisonString+" "+secondStringCounter);
			StringBuilder str1=new StringBuilder(firstLine);
			if((int)mainString.charAt(firstStringCounter)<(int)comparisonString.charAt(secondStringCounter))
			{
				//swap strings
				String swapString=mainString;
				mainString=comparisonString;
				comparisonString=swapString;
				int swapcounter=firstStringCounter;
				firstStringCounter=secondStringCounter;
				secondStringCounter=swapcounter;

				System.exit(1);
			}
			else{
				Boolean flag=false;
				for (int i = firstStringCounter; i < mainString.length(); i++) {
					System.out.println("i is"+i);
					for (int j = secondStringCounter; j < comparisonString.length(); j++) {
						System.out.println("j is"+j);
						if(comparisonString.charAt(j)<mainString.charAt(i)){
							System.out.println("deletion count increased");
							deletionCount++;
						}
						else if(comparisonString.charAt(j)>mainString.charAt(i)){
							System.out.println("swap the strings");
							secondStringCounter=j;
							flag=true;
							break;
						}
						else{
							secondStringCounter=j;
							break;
						}
						
					}
					if(flag){
						firstStringCounter=i;
						break;
					}
				}
			}
		}
		System.out.println(deletionCount);
		//start comparison and count deletions
	}
}
<commit_msg>37 anagram accepted<commit_after>package Warmup;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;

public class _37makeItAnagram {
	public static void main(String[] args) throws Exception {
		BufferedReader scanner=new BufferedReader(new InputStreamReader(System.in));
		String firstLine=(scanner.readLine());
		String secondLine=(scanner.readLine());
		char[] chars = firstLine.toCharArray();
		Arrays.sort(chars);
		firstLine = new String(chars);
		chars = secondLine.toCharArray();
		Arrays.sort(chars);
		secondLine = new String(chars);

		StringBuilder firstString=new StringBuilder(firstLine);
		StringBuilder secondString=new StringBuilder(secondLine);
		

		int deletionCount=0;

		while(true){
			if(firstString.length()==0)
			{
				deletionCount+=secondString.length();
				System.out.println(deletionCount);
				System.exit(0);
			}
			if(secondString.length()==0)
			{
				deletionCount+=firstString.length();
				System.out.println(deletionCount);
				System.exit(0);
			}
			if(firstString.charAt(0)>secondString.charAt(0))
			{
				deletionCount++;
				secondString.deleteCharAt(0);
			}
			else if(firstString.charAt(0)<secondString.charAt(0))
			{
				deletionCount++;
				firstString.deleteCharAt(0);
			}
			else{
				firstString.deleteCharAt(0);
				secondString.deleteCharAt(0);
			}
		}
	}
}

{'fraction_non_alphanumeric': 0.12137632078027635, 'fraction_numerical': 0.006502302898943376, 'mean_word_length': 4.163636363636364, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7227154', 'n_tokens_mistral': 1426, 'n_tokens_neox': 1123, 'n_words': 206}