{"provider_name":"Hatena Blog","published":"2005-11-22 00:00:00","provider_url":"https://hatena.blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.systemjp.net%2Fentry%2F20051122%2Fp1\" title=\"\u30ea\u30f3\u30af\u30ea\u30b9\u30c8\u306e\u30b5\u30a4\u30af\u30eb\u30c1\u30a7\u30c3\u30af - shikaku&#39;s blog\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","description":"\u300c\u5358\u65b9\u5411linked list\u306e\u5faa\u74b0\u53c2\u7167\u5224\u5b9a\u3092O(n)\u3067\u884c\u306a\u3046\u300d\u3088\u308a // labeling\u3042\u308a bool isCyclic(list*p){ set s; while(p!=null){ if (p in s) return true; s.insert(p); p = p->next; } return false; } // urao first // \u30eb\u30fc\u30d7\u306e\u5faa\u74b0\u9577\u3092\u3068\u60f3\u5b9a\u3057\u306a\u304c\u3089\u3001n\u30922\u500d\u3057\u3066\u3044\u304f\u65b9\u6cd5 bool isCyclic(list*p){ int n=1,m=n; list*q=null; while(p!=null) { if(p==q) return true; if(-\u2026","author_url":"https://blog.hatena.ne.jp/shikaku/","blog_url":"https://blog.systemjp.net/","author_name":"shikaku","url":"https://blog.systemjp.net/entry/20051122/p1","title":"\u30ea\u30f3\u30af\u30ea\u30b9\u30c8\u306e\u30b5\u30a4\u30af\u30eb\u30c1\u30a7\u30c3\u30af","image_url":null,"blog_title":"shikaku's blog","version":"1.0","type":"rich","height":"190","width":"100%","categories":["CPP"]}