éè¡å¡å¾
è¡å(Banker's deque)ãäºã¤ã®ãªã¹ãã§æ§æ奴ï½ï½ï½ï½ï½ï½ï½ å
¥å¥´ã¨åºå¥´ï½ï½ï½ï½ï½ï½ï½ï½ï½ï½ âå
¥å¥´ ä¸(^o^)ãã[(^o^)ã, (^o^)ã, (^o^)ã] ã½(^o^)ä¸ã[ã½(^o^), ã½(^o^), ã½(^o^)] âåºå¥´ 追å ã¯å
¥å¥´ã«consãåãåºãã¯åºå¥´ã«uncons奴ï½ï½ï½ï½ãªã¹ããªã®ã§åºæ¬å®æ°æé奴ï½ï½ï½ï½ï½ï½ï½ ãªã¹ãæ¯æ¸é²æ¢ã®çºããªã¹ãã®é·ãã«ä»¥ä¸ã®æ¡ä»¶èª²å¥´ï½ï½ï½ï½ï½ï½ï½ï½ï½ length (å
¥å¥´) <= length (åºå¥´) * 3 + 1 length (åºå¥´) <= length (å
¥å¥´) * 3 + 1 æ¡ä»¶å
足ä¸è½å ´åã|length (å
¥å¥´) - length (åºå¥´)| <= 1ãªãããä½å°åå転å¾çãå´ã®æ«å°¾ã«çµåãã¦èª¿æ´å¥´ï½ï½ï½ï½ï½ï½æéè¨ç®éO(length (å
¥å¥´) + length (åºå¥´))å¿
è¦ï½ï½ï½ï½ï½ï½ï½ï½
{{#tags}}- {{label}}
{{/tags}}