åçé
åã¸ã®è¿½å ã³ã¹ã㯠O(1) ã£ã¦ã®ã¯è¦ãã¦ããã°ããã ãã®è©±ã§ããï¼ã©ããã¦ãã¨è¨ãããã¨æå¤ã¨é£ãããã®ã§ãï¼ ã¨ããã®ã, ãã®O(1)ã£ã¦ã®ã¯åçé
åã®å®è£
æ¹æ³ã«å¼·ãä¾åãã¦ããããã§ãï¼å®è£
ãç¥ã£ã¦ããªãã¨çãããã¾ããï¼ ä¸è¬è«ã¨ãã¦ï¼1ã¤è¦ç´ ã追å ããã¨ãï¼é
åã«ç©ºãããªãã£ããæ°ããé
åãä½ãç´ãã¦å
¨è¦ç´ ãã³ãã¼ããå¿
è¦ãããã¾ãï¼ã³ãã¼ã®ã³ã¹ã㯠O(n) ã ããï¼è¿½å ã³ã¹ãã O(n) ã«ãªãã¨ããè°è«ãæ··ä¹±ã®å
ã«ãªã£ã¦ãã¾ãï¼ ããããã¨ãã¯ï¼è¦ç´ 追å ã n åç¹°ãè¿ããã¨ãã®è¨ç®éã n ã§å²ã£ãå¹³åãã¨ãã¨ãã解ææ¹æ³ã使ãããããã§ãï¼ä¸è¬ã«, ãã operation C ã®è¨ç®éã C ã n åè¡ã£ãã¨ãã®è¨ç®é O(n) ã n ã§å²ã£ãå¤ O(n)/n ã§è©ä¾¡ããææ³ããªãã解æ (amortized analysis)ã¨è¨ãããã§ãï¼ ãã¦ï¼s
{{#tags}}- {{label}}
{{/tags}}