Example #1
0
 public FixedPinTryNode(int[] dots, int index)
 {
     if (index != 59)
     {
         children[dots[index]] = new FixedPinTryNode(dots, index + 1);
     }
 }
Example #2
0
 public FixedPinTryNode(int[] dots, int index)
 {
     if (index != 59)
     {
         children[dots[index]] = new FixedPinTryNode(dots, index + 1);
     }
 }
Example #3
0
        public bool Contains(int[] dots, int index)
        {
            if (index == 59) return true;

            if (children[dots[index]] == null)
            {
                children[dots[index]] = new FixedPinTryNode(dots, index + 1);
                return false;
            }
            else return children[dots[index]].Contains(dots, index + 1);
        }
Example #4
0
        public bool Contains(int[] dots, int index)
        {
            if (index == 59)
            {
                return(true);
            }

            if (children[dots[index]] == null)
            {
                children[dots[index]] = new FixedPinTryNode(dots, index + 1);
                return(false);
            }
            else
            {
                return(children[dots[index]].Contains(dots, index + 1));
            }
        }