Linklist and DoublyLinklist

This demo is to help us identify the different between the Linklist and DoublyLinklist <<<<<<< HEAD what we need to notice Compare with the Linklist and DoublyLinklist, the Linklist compact with two elements, one is item, another is next point. the DoublyLinklist concact three elements, one is item as well, two others are preview ponit and next point. Linklist Linklist please notice some boundary conditions, like when we insert the elements the index need to be security check (index < 0 || index > N is not allowed) ======= what we need to notice Compare with the Linklist and DoublyLinklist, the Linklist compact with two elements, one is item, another is next point. the DoublyLinklist concact three elements, one is item as well, two others are preview ponit and next point. Linklist Linklist please notice some boundary conditions, like when we insert the elements the index need to be security check (index < 0 || index > N is not allowed) >>>>>>> 646945f00f4cd297d985fa39f786110cab66301d

Command Pattern in Python

Command 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 """ This is a Command Class """ class Command(ABC): """ The Command interface declares a method for executing a command. """ @abstractmethod def execute(self) -> None: pass @abstractmethod def undo(self) -> None: pass LightOnCommand 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 class LightOnCommand(Command): """ We need cohersion the Receiver and implement real command object """ def __init__(self, receiver: Receiver, a: str) -> None: self.

Java_in_SparseArray

SharseArray this demo is to help us transform the data from big data to the small data what we need to notic “= new int [11][11];” it means we have a Array is 11*11. 2D to sparseArray, then sparseArray to 2D 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 public class SparseArray { //create init 2D array // 0 means not 1 black 2 blue public static void main(String[] args) { System.

[中文] 《金缕曲》

《金缕曲·赠梁汾》是清代词人纳兰性德所写的一首词。 第一段: 德也狂生耳。偶然间,缁尘2京国,乌衣门第 3。有酒惟浇4赵州土5,谁会6成生此意。不