Best and simple data structure
- by anshu
I am trying to create the below matrix in my vb.net so during processing I can get the match scores for the alphabets, for example:
What is the match for A and N?, I will look into my inbuilt matrix and return -2
Similarly, What is the match for P and L?, I will look into my inbuilt matrix and return -3
Please suggest me how to go about it, I was trying to use nested dictionary like this:
Dim myNestedDictionary As New Dictionary(Of String, Dictionary(Of String, Integer))()
Dim lTempDict As New Dictionary(Of String, Integer)
lTempDict.Add("A", 4)
myNestedDictionary.Add("A", lTempDict)
The other way could be is to read the Matrix from a text based file and then fill the two dimensional array.
Thanks.