using System;
using System.Linq;
using System.Collections.Generic;
using System.Text.RegularExpressions;
namespace MyCompiler {
class Program {
public static void Main(string[] args)
{
Console.WriteLine("Hello world!");
ishex("aacbdb");
ishex("acabbaa");
ishex("aacbdbc");
ishex("abb");
}
public static void ishex(string str)
{
var dic = str.GroupBy(x => x).ToDictionary(x => x.Key,x => x.Count());
var iseven = (dic.Values.Count(x => x % 2 ==0)) > 0 && dic.Values.Count(x => x ==1) == 1
? true:false;
Console.WriteLine(iseven);
}
}
}
/*
Create a function that determines whether it is possible to build a palindrome from the characters in a string.
Examples
PossiblePalindrome("acabbaa") ➞ true
// Can make the following palindrome: "aabcbaa"
PossiblePalindrome("aacbdbc") ➞ true
// Can make the following palindrome: "abcdcba"
PossiblePalindrome("aacbdb") ➞ false
PossiblePalindrome("abacbb") ➞ false
*/
To embed this project on your website, copy the following code and paste it into your website's HTML: