예제 #1
0
파일: LRU_Cach.cs 프로젝트: a-berahman/Room
        private void MoveItToFirstElementAfterHead(DoubleLinkedListNode node)
        {
            RemoveCurrentNode(node);

            this.InsertAfterTheHead(node);
        }
예제 #2
0
파일: LRU_Cach.cs 프로젝트: a-berahman/Room
 private static void RemoveCurrentNode(DoubleLinkedListNode node)
 {
     // remove current node
     node.Previous.Next = node.Next;
     node.Next.Previous = node.Previous;
 }
예제 #3
0
파일: LRU_Cach.cs 프로젝트: a-berahman/Room
 public DoubleLinkedListNode(int key, int value)
 {
     this.KeyValue = new KeyValuePair <int, int>(key, value);
     Next          = null;
     Previous      = null;
 }