{"author_url":"https://blog.hatena.ne.jp/peroon/","provider_url":"https://hatena.blog","author_name":"peroon","type":"rich","blog_url":"https://perogram.hateblo.jp/","title":"\u914d\u5217\u304b\u3089\u30da\u30a2\u3067\u306a\u30442\u3064\u306e\u6570\u5b57\u3092\u898b\u3064\u3051\u308b\u3002XOR","height":"190","description":"\u30da\u30a2\u3067\u306a\u3044\u6570\u5b57\u306f2\u3064(x, y)\u3042\u308b\u3068\u3044\u3046\u8a2d\u5b9a \u4f8b Input: {12, 23, 34, 12, 12, 23, 12, 45} Output: 34 and 45 \u30bd\u30fc\u30c8\u3059\u308c\u3070 O(n log n) \u3057\u304b\u3057O(n)\u306e\u89e3\u6cd5\u304c\u3042\u308b https://www.geeksforgeeks.org/find-the-two-numbers-with-odd-occurences-in-an-unsorted-array/ \u89e3\u6cd5 \u5168\u3066\u306eXOR\u3092\u6c42\u3081\u308b\u3002x xor y\u3060\u3051\u6b8b\u308b a = x ^ y \u3068\u3059\u308b LSB (Least Significant Bit) a & -a \u3092\u6c42\u3081\u308b a = 01010 -\u2026","categories":[],"url":"https://perogram.hateblo.jp/entry/2019/05/29/063405","image_url":null,"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fperogram.hateblo.jp%2Fentry%2F2019%2F05%2F29%2F063405\" title=\"\u914d\u5217\u304b\u3089\u30da\u30a2\u3067\u306a\u30442\u3064\u306e\u6570\u5b57\u3092\u898b\u3064\u3051\u308b\u3002XOR - perogram\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","blog_title":"perogram","provider_name":"Hatena Blog","published":"2019-05-29 06:34:05","width":"100%","version":"1.0"}