{"provider_name":"Hatena Blog","categories":["Rust"],"title":"\u672b\u5c3e\u518d\u5e30\u3092\u30eb\u30fc\u30d7\u306b\u3067\u304d\u306a\u3044Rust\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u4f8b","version":"1.0","type":"rich","url":"https://qnighy.hatenablog.com/entry/2017/05/06/070000","author_name":"qnighy","provider_url":"https://hatena.blog","published":"2017-05-06 07:00:00","blog_url":"https://qnighy.hatenablog.com/","height":"190","author_url":"https://blog.hatena.ne.jp/qnighy/","width":"100%","description":"\u6982\u8981: \u751f\u5b58\u671f\u9593\u306e\u95a2\u4fc2\u3067\u3001\u30eb\u30fc\u30d7\u3067\u306f\u66f8\u3051\u306a\u3044\u304c\u672b\u5c3e\u518d\u5e30\u3067\u306f\u66f8\u3051\u308b\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306e\u4f8b\u3092\u6319\u3052\u308b\u3002 \u5358\u65b9\u5411\u30ea\u30f3\u30af\u30ea\u30b9\u30c8 \u6b21\u306e\u3088\u3046\u306a\u5358\u7d14\u306a\u30ea\u30f3\u30af\u30ea\u30b9\u30c8\u3092\u8003\u3048\u308b\u3002 struct List<T> { root: Option<Box<Node<T>>>, } struct Node<T> { value: T, next: Option<Box<Node<T>>>, } back\u306e\u5b9f\u88c5 \u5358\u65b9\u5411\u30ea\u30f3\u30af\u30ea\u30b9\u30c8\u306e\u672b\u5c3e\u8981\u7d20\u306e\u53d6\u5f97\u306f O(n) \u3067\u3042\u308b\u3002\u3053\u308c\u306f\u6b21\u306e\u3088\u3046\u306b\u66f8\u304f\u3053\u3068\u304c\u3067\u304d\u308b\u3002 impl<T> List<T> { fn back(&self) -> Option<&T> { let mut node = if\u2026","image_url":"https://cdn-ak.f.st-hatena.com/images/fotolife/q/qnighy/20170505/20170505221029.png","blog_title":"\u7c21\u6f54\u306aQ","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fqnighy.hatenablog.com%2Fentry%2F2017%2F05%2F06%2F070000\" title=\"\u672b\u5c3e\u518d\u5e30\u3092\u30eb\u30fc\u30d7\u306b\u3067\u304d\u306a\u3044Rust\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u4f8b - \u7c21\u6f54\u306aQ\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>"}