Nt1330 Unit 2 English Language Programs

122 Words1 Page
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; namespace HuffmanTest { class Program { static void Main(string[] args) { string ecoilText = File.ReadAllText(@"\ny-fs1UserssmechineniDesktopHauffmanecoli.txt").Replace(" ", ""); Dictionary charFrequency = new Dictionary(); charFrequency["A"] = ecoilText.Count(f => f == 'A '); charFrequency["C"] = ecoilText.Count(f => f == 'C '); charFrequency["G"] = ecoilText.Count(f => f == 'G '); charFrequency["T"] = ecoilText.Count(f => f == 'T '); IList list = new List(); for (int i = 0; i < charFrequency.Count; i++)
Open Document