{"id":473340,"date":"2025-09-02T16:13:44","date_gmt":"2025-09-02T16:13:44","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=473340"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=473340","title":{"rendered":"<span>\u041a\u0430\u043a Java-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0443 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0440\u0435\u0448\u0430\u0442\u044c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041c\u043d\u043e\u0433\u0438\u0435 Java-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0431\u043e\u044f\u0442\u0441\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0437\u0430\u0434\u0430\u0447 (\u0438 \u044f \u043e\u0434\u0438\u043d \u0438\u0437 \u0442\u0435\u0445, \u043a\u0442\u043e \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u043a\u0430\u0436\u0434\u0443\u044e \u0434\u0438\u0441\u043a\u0443\u0441\u0441\u0438\u0443\u044e \u043d\u0430 \u0442\u0435\u043c\u0443 \u043d\u0430\u0434\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0430\u043b\u0433\u043e-\u0441\u043e\u0431\u0435\u0441\u043e\u0432 \u0434\u043b\u044f \u0431\u0438\u0433\u0442\u0435\u0445\u0430). \u041e\u043d\u0438 \u043a\u0430\u0436\u0443\u0442\u0441\u044f \u0447\u0435\u043c-\u0442\u043e \u0438\u0437 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438: \u0433\u0434\u0435-\u0442\u043e \u0442\u0430\u043c, \u0432 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0438\u0442\u0435\u0442\u0430\u0445, \u043d\u0430 LeetCode, \u0432 \u0441\u043e\u0431\u0435\u0441\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f\u0445 \u0432 FAANG \u0438 \u043a\u043e\u043d\u0442\u0435\u0441\u0442\u0430\u0445.<\/p>\n<p>\u041d\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0442\u0430\u043a\u043e\u0432\u0430: \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0440\u0430\u0441\u0442\u0438 \u2014 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u0437\u043d\u0430\u0442\u044c <strong>\u043d\u0443\u0436\u043d\u043e<\/strong> \u0438\u043b\u0438 \u0445\u043e\u0442\u044f \u0431\u044b \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e. \u0418 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0434\u0438 \u0441\u043e\u0431\u0435\u0441\u043e\u0432. \u041e\u043d\u0438 \u0432 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u043c\u044b\u0441\u043b\u0438\u0442\u044c \u043a\u0430\u043a \u0438\u043d\u0436\u0435\u043d\u0435\u0440: \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0438, \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c, \u043f\u0438\u0441\u0430\u0442\u044c \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434, \u043d\u0443 \u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u043e \u043c\u044b\u0441\u043b\u0438\u0442\u044c \ud83d\ude42<\/p>\n<p>\u042f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043e\u0439\u0442\u0438 \u043a \u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0443 <strong>\u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e \u0438 \u0431\u0435\u0437 \u0431\u043e\u043b\u0438<\/strong> \u2014 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043b\u0438\u0447\u043d\u043e\u0433\u043e \u043e\u043f\u044b\u0442\u0430 Java-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0438 \u043f\u0440\u0435\u043f\u043e\u0434\u0430\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<h3>\u041f\u043e\u0447\u0435\u043c\u0443 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u043f\u0443\u0433\u0430\u044e\u0442 \u0438\u043c\u0435\u043d\u043d\u043e Java-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432<\/h3>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b\u0438 \u0440\u0435\u0448\u0430\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0438 \u043d\u0430 Java \u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043b\u0438 \u0441\u0432\u043e\u0439 \u043a\u043e\u0434 \u0441 Python (\u0430 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043b\u0430\u0434\u043a\u0438\u0439 \u0440\u0430\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0441\u0430\u0445\u0430\u0440\u0430), \u0432\u044b \u0437\u043d\u0430\u0435\u0442\u0435 \u0431\u043e\u043b\u044c:<\/p>\n<ul>\n<li>\n<p>10 \u0441\u0442\u0440\u043e\u0447\u0435\u043a \u0432\u043c\u0435\u0441\u0442\u043e 1 &#8212; \u0431\u044b\u043b \u0432 \u0448\u043e\u043a\u0435, \u043a\u043e\u0433\u0434\u0430 \u0443\u0432\u0438\u0434\u0435\u043b,<\/p>\n<\/li>\n<li>\n<p><code>Map&lt;String, List&lt;Integer&gt;&gt;<\/code> \u2014 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u0442\u0440\u0430\u0448\u043d\u0435\u0435, \u0447\u0435\u043c \u0441\u0430\u043c\u0430 \u0437\u0430\u0434\u0430\u0447\u0430,<\/p>\n<\/li>\n<li>\n<p>\u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0437\u0430\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0433\u0443\u0433\u043b\u0438\u0442\u044c <code>Java how to initialize HashMap of Lists<\/code> \u0432 2025 \u0433\u043e\u0434\u0443-\u0442\u043e.<\/p>\n<\/li>\n<\/ul>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, Java-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0447\u0430\u0441\u0442\u043e \u043f\u0440\u043e \u00ab\u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0443\u00bb \u2014 \u0438 \u0441\u043b\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u043c\u044b\u0448\u043b\u0435\u043d\u0438\u0435 &#171;\u0433\u0440\u0430\u0444\u044b \u0438 \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0438&#187;.<\/p>\n<h3>\u0427\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0443\u0436\u043d\u043e \u0437\u043d\u0430\u0442\u044c Java-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0443<\/h3>\n<p>\u0412\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u043e\u0440\u0435\u0448\u0430\u0442\u044c \u0432\u0435\u0441\u044c LeetCode, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0430 <strong>5 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0442\u0435\u043c\u0430\u0445<\/strong>:<\/p>\n<ol>\n<li>\n<p><strong>\u0421\u0442\u0440\u043e\u043a\u0438 \u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u044b<\/strong> \u2014 \u043e\u0441\u043d\u043e\u0432\u0430 \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435\u0445 \u0437\u0430\u0434\u0430\u0447<\/p>\n<\/li>\n<li>\n<p><strong>\u0425\u0435\u0448-\u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430<\/strong> (<code>HashMap<\/code>, <code>HashSet<\/code>) \u2014 \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430<\/p>\n<\/li>\n<li>\n<p><strong>\u041e\u0447\u0435\u0440\u0435\u0434\u0438 \u0438 \u0441\u0442\u0435\u043a\u0438<\/strong> (<code>Deque<\/code>, <code>Queue<\/code>, <code>Stack<\/code>)<\/p>\n<\/li>\n<li>\n<p><strong>\u0414\u0435\u0440\u0435\u0432\u044c\u044f \u0438 \u0433\u0440\u0430\u0444\u044b<\/strong> (\u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043e\u0431\u0445\u043e\u0434\u044b \u0438 \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u044f)<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u043e\u0438\u0441\u043a, \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430, \u0434\u0432\u0430 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f, \u0441\u043a\u043e\u043b\u044c\u0437\u044f\u0449\u0435\u0435 \u043e\u043a\u043d\u043e<\/strong><\/p>\n<\/li>\n<\/ol>\n<p>\u0410 \u0435\u0449\u0451 \u2014 \u043d\u0430\u0443\u0447\u0438\u0442\u0435\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b <strong>\u0443\u043c\u043d\u043e<\/strong>, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e:<\/p>\n<ul>\n<li>\n<p><code>PriorityQueue<\/code> \u0434\u043b\u044f \u043a\u0443\u0447\u0438,<\/p>\n<\/li>\n<li>\n<p><code>Deque<\/code> \u043a\u0430\u043a \u0434\u0432\u0443\u0445\u0441\u0442\u043e\u0440\u043e\u043d\u043d\u044e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c,<\/p>\n<\/li>\n<li>\n<p><code>Map.computeIfAbsent<\/code> \u2014 \u0434\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<\/li>\n<\/ul>\n<h3>\u041c\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434: \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u0431\u0435\u0437 \u0431\u043e\u043b\u0438<\/h3>\n<h4>1. \u0414\u0435\u043b\u0430\u0442\u044c \u043d\u0435 \u201c\u0434\u043b\u044f \u0433\u0430\u043b\u043e\u0447\u043a\u0438\u201d, \u0430 \u043f\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0443<\/h4>\n<p>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u2014 \u044d\u0442\u043e \u043d\u0435 \u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447, \u0430 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 <strong>\u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432<\/strong>. \u0426\u0435\u043b\u044c: \u043d\u0435 \u0438\u0437\u043e\u0431\u0440\u0435\u0442\u0430\u0442\u044c, \u0430 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0442\u044c.<\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<ul>\n<li>\n<p>\u0421\u043b\u043e\u0432\u0430\u0440\u0438 \u2192 \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u2192 <code>Map.getOrDefault(...)<\/code><\/p>\n<\/li>\n<li>\n<p>\u0421\u0442\u0435\u043a \u2192 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u043a\u043e\u0431\u043e\u043a \u2192 <code>Stack&lt;Character&gt;<\/code><\/p>\n<\/li>\n<li>\n<p>BFS \u2192 <code>Queue&lt;TreeNode&gt;<\/code>, \u043e\u0431\u0445\u043e\u0434 \u043f\u043e \u0443\u0440\u043e\u0432\u043d\u044f\u043c<\/p>\n<\/li>\n<\/ul>\n<p>\u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 12 \u0442\u0438\u043f\u043e\u0432\u044b\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0437\u0430\u0434\u0430\u0447, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043a\u0440\u043e\u044e\u0442 &gt;70% \u0440\u0435\u0448\u0435\u043d\u0438\u0439. \u0412\u0430\u0448\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u043b\u0438\u0448\u044c \u044d\u0442\u043e\u0442 \u0448\u0430\u0431\u043b\u043e\u043d \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c. \u0412\u043e\u0442 \u043e\u043d\u0438, \u0441\u043b\u0435\u0432\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u043e: <\/p>\n<ol>\n<li>\n<p>\u0414\u0432\u0430 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f;<\/p>\n<\/li>\n<li>\n<p>\u0421\u043a\u043e\u043b\u044c\u0437\u044f\u0449\u0435\u0435 \u043e\u043a\u043d\u043e;<\/p>\n<\/li>\n<li>\n<p>\u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0438 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0439 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c (\u043f\u043e\u0438\u0441\u043a \u0446\u0438\u043a\u043b\u0430);<\/p>\n<\/li>\n<li>\n<p>\u0421\u0442\u0435\u043a \u0434\u043b\u044f \u0441\u043a\u043e\u0431\u043e\u043a \/ \u041c\u043e\u043d\u043e\u0442\u043e\u043d\u043d\u044b\u0439 \u0441\u0442\u0435\u043a;<\/p>\n<\/li>\n<li>\n<p>\u0411\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u043f\u043e\u0438\u0441\u043a (\u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443\/\u043f\u043e \u043e\u0442\u0432\u0435\u0442\u0443);<\/p>\n<\/li>\n<li>\n<p>\u0425\u0435\u0448-\u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0434\u043b\u044f \u043f\u043e\u0434\u0441\u0447\u0435\u0442\u0430\/\u043f\u043e\u0438\u0441\u043a\u0430;<\/p>\n<\/li>\n<li>\n<p>\u041e\u0431\u0440\u0430\u0442\u043d\u044b\u0439 \u043e\u0442\u0441\u0447\u0435\u0442;<\/p>\n<\/li>\n<li>\n<p>\u041e\u0431\u0445\u043e\u0434 \u0432 \u0448\u0438\u0440\u0438\u043d\u0443 (BFS) \/ \u041e\u0431\u0445\u043e\u0434 \u0432 \u0433\u043b\u0443\u0431\u0438\u043d\u0443 (DFS) (\u043f\u043e \u0434\u0435\u0440\u0435\u0432\u0443\/\u043f\u043e \u0433\u0440\u0430\u0444\u0443);<\/p>\n<\/li>\n<li>\n<p>\u0414\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 (\u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0438 \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u044f \u0441 \u043c\u0435\u043c\u043e\u0438\u0437\u0430\u0446\u0438\u0435\u0439);<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0438\u0441\u043a <code>k<\/code> \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 (\u043a\u0443\u0447\u0430\/\u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043d\u0430\u044f \u043e\u0447\u0435\u0440\u0435\u0434\u044c);<\/p>\n<\/li>\n<li>\n<p>\u0416\u0430\u0434\u043d\u044b\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \/ \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438;<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0435\u0444\u0438\u043a\u0441\u043d\u044b\u0435 \u0441\u0443\u043c\u043c\u044b \/ \u041c\u0430\u0441\u0441\u0438\u0432 \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u0435\u0439.<\/p>\n<\/li>\n<\/ol>\n<p>\u0422\u0430\u043a \u0436\u0435 \u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0435\u0441\u0442\u044c \u0438 \u0441\u0432\u043e\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430. \u041d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 <strong>\u0414\u0432\u0443\u0445 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439<\/strong>:<\/p>\n<ul>\n<li>\n<p><strong>\u041a\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c<\/strong>: \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u044b \u0441 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c\u0438, \u043f\u043e\u0438\u0441\u043a \u043f\u0430\u0440\/\u0442\u0440\u043e\u0435\u043a \u0447\u0438\u0441\u0435\u043b.<\/p>\n<\/li>\n<li>\n<p><strong>\u0427\u0442\u043e \u0443\u0447\u0438\u0442\u044c<\/strong>: \u043e\u0434\u0438\u043d \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0432 \u043d\u0430\u0447\u0430\u043b\u0435, \u0434\u0440\u0443\u0433\u043e\u0439 \u0432\u00a0\u043a\u043e\u043d\u0446\u0435 \u2192 \u0434\u0432\u0438\u0433\u0430\u044e\u0442\u0441\u044f \u043d\u0430\u0432\u0441\u0442\u0440\u0435\u0447\u0443 \u0438\u043b\u0438 \u0432 \u043e\u0434\u043d\u043e\u043c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>\u0422\u0438\u043f\u043e\u0432\u044b\u0435 \u0441\u043b\u0443\u0447\u0430\u0438<\/strong>: \u043d\u0430\u0439\u0442\u0438 \u043f\u0430\u0440\u0443 \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0441\u0443\u043c\u043c\u043e\u0439; \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u044b, \u0441\u0442\u0440\u043e\u043a\u0438; \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0434\u0443\u0431\u043b\u0438\u043a\u0430\u0442\u044b \/ \u043f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b; \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438 \u0441\u0442\u0440\u043e\u043a\u0430 \u043f\u0430\u043b\u0438\u043d\u0434\u0440\u043e\u043c\u043e\u043c, \u0441\u043b\u0438\u0442\u044c \u0434\u0432\u0430 \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043c\u0430\u0441\u0441\u0438\u0432\u0430.<\/p>\n<\/li>\n<li>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0444\u043e\u0440\u043c\u044b:<\/p>\n<p>1) \u041e\u0431\u0430 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f \u0434\u0432\u0438\u0433\u0430\u044e\u0442\u0441\u044f \u043a \u0446\u0435\u043d\u0442\u0440\u0443:<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"java\">int left = 0; int reght = arr.length - 1; while (left &lt; right) {   \/\/ \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430   if (\u0443\u0441\u043b\u043e\u0432\u0438\u0435) {     left++;   } else {     right--;   } }<\/code><\/pre>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043f\u0430\u0440\u0443 \u0441 \u0441\u0443\u043c\u043c\u043e\u0439, \u043f\u0430\u043b\u0438\u043d\u0434\u0440\u043e\u043c\u043d\u043e\u0441\u0442\u044c, \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u0438<\/p>\n<p>\u0418 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435, \u0434\u0443\u043c\u0430\u044e \u0432\u044b \u043f\u043e\u043d\u044f\u043b\u0438.<\/p>\n<h4>2. \u041f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u0435 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437 \u043e\u0448\u0438\u0431\u043e\u043a<\/h4>\n<p>\u0420\u0435\u0448\u0438\u043b\u0438 \u0437\u0430\u0434\u0430\u0447\u0443? \u041e\u0442\u043b\u043e\u0436\u0438\u0442\u0435. \u0427\u0435\u0440\u0435\u0437 2 \u0434\u043d\u044f \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u043f\u0440\u043e\u0440\u0435\u0448\u0430\u0442\u044c \u0435\u0451 \u0437\u0430\u043d\u043e\u0432\u043e. \u0422\u043e\u043b\u044c\u043a\u043e \u0442\u0430\u043a \u0448\u0430\u0431\u043b\u043e\u043d \u0443\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043c\u043e\u0437\u0433.<\/p>\n<p>\u0422\u0430\u043a \u0436\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0447\u043a\u0443:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p align=\"center\"><strong>\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"center\"><strong>\u041f\u0430\u0442\u0442\u0435\u0440\u043d<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"center\"><strong>\u0413\u0434\u0435 \u0442\u0443\u043f\u0438\u043b<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"center\"><strong>\u041a\u0430\u043a \u0440\u0435\u0448\u0438\u043b<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">125. Valid Palindrome<\/p>\n<\/td>\n<td>\n<p align=\"center\">\u0414\u0432\u0430 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0421 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u0441\u043f\u0435\u0446 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0438 \u0446\u0438\u0444\u0440<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0434\u0432\u0430 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0432\u0438\u0433\u0430\u044e\u0442\u0441\u044f \u0441 \u0434\u0432\u0443\u0445 \u043a\u043e\u043d\u0446\u043e\u0432&#8230;<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0427\u0435\u043c \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u0435\u0435 \u0432\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u0440\u0430\u0441\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u044f, \u0442\u0435\u043c \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0431\u0443\u0434\u0435\u0442\u0435 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u0442\u044c \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u044b.<\/p>\n<h4>3. \u041d\u0435 \u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0430\u043c\u0443\u044e \u0441\u043b\u043e\u0436\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443 \u0432 \u043b\u0435\u043d\u0442\u0435<\/h4>\n<p>\u041b\u0443\u0447\u0448\u0435 5 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0437\u0430\u0434\u0430\u0447 \u0432 \u0434\u0435\u043d\u044c, \u0447\u0435\u043c \u043e\u0434\u043d\u0430 \u00abHard\u00bb \u0441 \u0431\u043e\u043b\u044c\u044e \u0438 \u0432\u044b\u0433\u043e\u0440\u0430\u043d\u0438\u0435\u043c. \u0417\u0430\u0447\u0430\u0441\u0442\u0443\u044e, \u0437\u0430\u0434\u0430\u0447\u043a\u0438 \u0443\u0440\u043e\u0432\u043d\u044f Hard \u0434\u043b\u044f \u043d\u0430\u0431\u0438\u0432\u0448\u0438\u0445 \u0440\u0443\u043a\u0443 \u0440\u0435\u0431\u044f\u0442. <\/p>\n<p>\u0414\u0430 \u0438 \u0432\u043e\u043e\u0431\u0449\u0435, \u0430 \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043b\u0435\u0433\u043a\u043e, \u0441\u0440\u0435\u0434\u043d\u0435 \u0438\u043b\u0438 \u0441\u043b\u043e\u0436\u043d\u043e? LeetCode \u0438 CodeRun \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043f\u0440\u043e\u0432\u043e\u0434\u044f\u0442 \u043f\u0435\u0440\u0435\u043e\u0446\u0435\u043d\u043a\u0443 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438.<\/p>\n<h3>\u0424\u0438\u0448\u043a\u0438 Java, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u043e \u0443\u043f\u0440\u043e\u0449\u0430\u044e\u0442 \u0436\u0438\u0437\u043d\u044c<\/h3>\n<p>\u0412\u043e\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 <strong>\u0432 100% \u0441\u043b\u0443\u0447\u0430\u0435\u0432<\/strong> \u0434\u0435\u043b\u0430\u044e\u0442 \u043a\u043e\u0434 \u043a\u043e\u0440\u043e\u0447\u0435:<\/p>\n<ul>\n<li>\n<p><code>StringBuilder<\/code> \u0432\u043c\u0435\u0441\u0442\u043e \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441\u0442\u0440\u043e\u043a<\/p>\n<\/li>\n<li>\n<p><code>Map.computeIfAbsent(key, k -&gt; new ArrayList&lt;&gt;())<\/code> \u2014 \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e<\/p>\n<\/li>\n<li>\n<p><code>Deque<\/code> \u043a\u0430\u043a \u0441\u0442\u0435\u043a \u0438\u043b\u0438 \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0441 \u043e\u0431\u0435\u0438\u0445 \u0441\u0442\u043e\u0440\u043e\u043d<\/p>\n<\/li>\n<li>\n<p><code>List.subList(start, end)<\/code> \u2014 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043f\u0440\u0438 \u0437\u0430\u0434\u0430\u0447\u0430\u0445 \u043d\u0430 \u0441\u043a\u043e\u043b\u044c\u0437\u044f\u0449\u0435\u0435 \u043e\u043a\u043d\u043e<\/p>\n<\/li>\n<li>\n<p><code>PriorityQueue&lt;&gt;(Comparator.comparingInt(...))<\/code> \u2014 \u0433\u0438\u0431\u043a\u043e \u0438 \u0447\u0438\u0442\u0430\u0435\u043c\u043e<\/p>\n<\/li>\n<\/ul>\n<h3>\u041f\u0440\u0438\u043c\u0435\u0440: \u043f\u0435\u0440\u0432\u0430\u044f \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u0431\u0443\u043a\u0432\u0430 \u0432 \u0441\u0442\u0440\u043e\u043a\u0435<\/h3>\n<p><strong>\u0417\u0430\u0434\u0430\u0447\u0430:<\/strong><br \/> \u041d\u0430\u0439\u0442\u0438 \u0438\u043d\u0434\u0435\u043a\u0441 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043d\u0435\u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0435\u0433\u043e\u0441\u044f \u0441\u0438\u043c\u0432\u043e\u043b\u0430 \u0432 \u0441\u0442\u0440\u043e\u043a\u0435.<\/p>\n<p><strong>\u041f\u043b\u0430\u043d:<\/strong><\/p>\n<ol>\n<li>\n<p>\u041f\u0440\u043e\u0439\u0442\u0438 \u0441\u0442\u0440\u043e\u043a\u0443 \u0438 \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0447\u0430\u0441\u0442\u043e\u0442\u044b (<code>Map<\/code>)<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0439\u0442\u0438 \u0441\u0442\u0440\u043e\u043a\u0443 \u0435\u0449\u0451 \u0440\u0430\u0437 \u2014 \u043d\u0430\u0439\u0442\u0438 \u043f\u0435\u0440\u0432\u044b\u0439, \u0447\u0435\u0439 count = 1<\/p>\n<\/li>\n<\/ol>\n<p><strong>Java-\u043a\u043e\u0434:<\/strong><\/p>\n<pre><code class=\"java\">public int firstUniqChar(String s) {     Map count = new HashMap&amp;lt;&amp;gt;();     for (char c : s.toCharArray()) {         count.put(c, count.getOrDefault(c, 0) + 1);     }     for (int i = 0; i &amp;lt; s.length(); i++) {         if (count.get(s.charAt(i)) == 1) {             return i;         }     }     return -1; } <\/code><\/pre>\n<p><strong>\u041f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u0435:<\/strong><\/p>\n<ul>\n<li>\n<p>\u0412 \u043f\u0435\u0440\u0432\u043e\u043c \u0446\u0438\u043a\u043b\u0435 \u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0447\u0430\u0441\u0442\u043e\u0442\u044b \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u0430<\/p>\n<\/li>\n<li>\n<p>\u0412\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u2014 \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u043f\u0435\u0440\u0432\u044b\u0439, \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e <code>count = 1<\/code><\/p>\n<\/li>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <code>getOrDefault()<\/code> \u2014 \u043a\u043b\u0430\u0441\u0441\u0438\u043a\u0430 \u0437\u0430\u0434\u0430\u0447 \u043d\u0430 \u0441\u0447\u0451\u0442\u0447\u0438\u043a\u0438<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u041f\u043e\u0447\u0435\u043c\u0443 \u044d\u0442\u043e \u0432\u0430\u0436\u043d\u043e:<\/strong><\/p>\n<ul>\n<li>\n<p>\u042d\u0442\u043e \u043a\u043b\u0430\u0441\u0441\u0438\u043a\u0430: \u0441\u0447\u0451\u0442\u0447\u0438\u043a\u0438, \u043f\u0440\u043e\u0445\u043e\u0434\u044b, \u043c\u0430\u043f\u0430.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043c\u044b\u0448\u043b\u0435\u043d\u0438\u0435 \u0438 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 Java.<\/p>\n<\/li>\n<\/ul>\n<p>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u2014 \u044d\u0442\u043e \u043d\u0435 \u0441\u0442\u0440\u0430\u0448\u043d\u043e. \u042d\u0442\u043e <strong>\u043d\u0430\u0432\u044b\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0431\u0438\u0446\u0443\u0445\u0430<\/strong>: \u0441 \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u0435\u043c \u0438 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u043e\u0439. \u0414\u043b\u044f Java-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u2014 \u043e\u0441\u0432\u043e\u0438\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0438 \u043d\u0430\u0443\u0447\u0438\u0442\u044c\u0441\u044f <strong>\u0434\u0443\u043c\u0430\u0442\u044c \u043a\u0430\u043a \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0438\u0441\u0442<\/strong>, \u043d\u0435 \u0442\u0435\u0440\u044f\u044f \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430.<\/p>\n<p>\u0414\u0430 \u0438 \u0432 \u0446\u0435\u043b\u043e\u043c, \u043d\u0435 \u0437\u0430\u043c\u0435\u0447\u0430\u043b\u0438 \u043b\u0438 \u0432\u044b, \u0447\u0442\u043e \u043f\u0440\u043e\u0449\u0435 \u043f\u043e\u0442\u0440\u0430\u0442\u0438\u0442\u044c \u043c\u0435\u0441\u044f\u0446-\u0434\u0432\u0430 \u043d\u0430 \u00ab\u0437\u0443\u0431\u0440\u0435\u0436\u043a\u0443\u00bb \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432 \u0438 \u0438\u0434\u0442\u0438 \u0432 \u0431\u0438\u0433\u0442\u0435\u0445, \u0447\u0435\u043c \u043d\u0430\u0431\u0438\u0432\u0430\u0442\u044c \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432\u044b\u0439 \u043e\u043f\u044b\u0442? \u041d\u0435\u0442? \u0417\u0430\u0434\u0443\u043c\u0430\u0439\u0442\u0435\u0441\u044c.<\/p>\n<p>\u0423\u0447\u0438\u0442\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b, \u0431\u0443\u0434\u044c\u0442\u0435 \u0441\u0438\u043b\u044c\u043d\u044b \u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u043e\u0441\u0442\u0430\u0432\u0430\u0439\u0442\u0435\u0441\u044c \u043d\u0430 \u0448\u0430\u0433 \u0432\u043f\u0435\u0440\u0435\u0434\u0438. \u0423\u0441\u043f\u0435\u0445\u043e\u0432 \u0432 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0438!<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430 \u0436\u0438\u0437\u043d\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0439\u0442\u0435\u0441\u044c \u043d\u0430 \u043c\u043e\u0439 \u0422\u0413 \u043a\u0430\u043d\u0430\u043b &#8212;\u00a0<a href=\"https:\/\/t.me\/TrueRuslan_Blog\" rel=\"noopener noreferrer nofollow\">\u041d\u0435\u043c\u044b\u043a\u0438\u043d.\u041f\u0440\u043e\u0434\u0430\u043a\u0448\u043d<\/a><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><\/p>\n<div class=\"tm-article-poll-container\"><!--[--><\/p>\n<div class=\"tm-article-poll tm-article-poll_variant-bordered\">\n<div class=\"tm-notice tm-notice_positive tm-article-poll__notice\"><!----><\/p>\n<div class=\"tm-notice__inner\"><!----><\/p>\n<div class=\"tm-notice__content\" data-test-id=\"notice-content\"><!--[--><span>\u0422\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u043f\u0440\u043e\u0441\u0435. <a rel=\"nofollow\" href=\"\/kek\/v1\/auth\/habrahabr\/?back=\/ru\/articles\/932998\/&#038;hl=ru\">\u0412\u043e\u0439\u0434\u0438\u0442\u0435<\/a>, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.<\/span><!--]--><\/div>\n<\/div>\n<\/div>\n<p><!--[--><\/p>\n<div class=\"tm-article-poll__header\">\u041a\u0430\u043a \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u0441\u044c \u043a \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u0435\u043a\u0446\u0438\u0438 \u043d\u0430 \u0441\u043e\u0431\u0435\u0441\u0435?<\/div>\n<div class=\"tm-article-poll__answers\"><!--[--><\/p>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">27.91%<\/span><span class=\"tm-article-poll__answer-label\">\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e<\/span><span class=\"tm-article-poll__answer-votes\">12<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width: 27.91%\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">27.91%<\/span><span class=\"tm-article-poll__answer-label\">\u0412\u0440\u043e\u0434\u0435 \u043e\u043a, \u043d\u043e \u0441 \u043c\u043e\u0438\u043c-\u0442\u043e \u043e\u043f\u044b\u0442\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0438 \u0431\u0435\u0437 \u043d\u0438\u0445<\/span><span class=\"tm-article-poll__answer-votes\">12<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width: 27.91%\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent tm-article-poll__answer-percent_winning\">44.19%<\/span><span class=\"tm-article-poll__answer-label\">\u041b\u0438\u0448\u043d\u044f\u044f \u0442\u0440\u0430\u0442\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u0438<\/span><span class=\"tm-article-poll__answer-votes\">19<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress tm-article-poll__answer-progress_winning\" style=\"width: 44.19%\"><\/div>\n<\/div>\n<\/div>\n<p><!--]--><\/div>\n<div class=\"tm-article-poll__stats\"> \u041f\u0440\u043e\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043b\u0438 43 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.    \u0412\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u043b\u0438\u0441\u044c 7 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439. <\/div>\n<p><!--]--><\/div>\n<p><!--]--><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/932998\/\"> https:\/\/habr.com\/ru\/articles\/932998\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041c\u043d\u043e\u0433\u0438\u0435 Java-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0431\u043e\u044f\u0442\u0441\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0437\u0430\u0434\u0430\u0447 (\u0438 \u044f \u043e\u0434\u0438\u043d \u0438\u0437 \u0442\u0435\u0445, \u043a\u0442\u043e \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u043a\u0430\u0436\u0434\u0443\u044e \u0434\u0438\u0441\u043a\u0443\u0441\u0441\u0438\u0443\u044e \u043d\u0430 \u0442\u0435\u043c\u0443 \u043d\u0430\u0434\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0430\u043b\u0433\u043e-\u0441\u043e\u0431\u0435\u0441\u043e\u0432 \u0434\u043b\u044f \u0431\u0438\u0433\u0442\u0435\u0445\u0430). \u041e\u043d\u0438 \u043a\u0430\u0436\u0443\u0442\u0441\u044f \u0447\u0435\u043c-\u0442\u043e \u0438\u0437 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438: \u0433\u0434\u0435-\u0442\u043e \u0442\u0430\u043c, \u0432 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0438\u0442\u0435\u0442\u0430\u0445, \u043d\u0430 LeetCode, \u0432 \u0441\u043e\u0431\u0435\u0441\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f\u0445 \u0432 FAANG \u0438 \u043a\u043e\u043d\u0442\u0435\u0441\u0442\u0430\u0445.<\/p>\n<p>\u041d\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0442\u0430\u043a\u043e\u0432\u0430: \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0440\u0430\u0441\u0442\u0438 \u2014 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u0437\u043d\u0430\u0442\u044c <strong>\u043d\u0443\u0436\u043d\u043e<\/strong> \u0438\u043b\u0438 \u0445\u043e\u0442\u044f \u0431\u044b \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e. \u0418 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0434\u0438 \u0441\u043e\u0431\u0435\u0441\u043e\u0432. \u041e\u043d\u0438 \u0432 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u043c\u044b\u0441\u043b\u0438\u0442\u044c \u043a\u0430\u043a \u0438\u043d\u0436\u0435\u043d\u0435\u0440: \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0438, \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c, \u043f\u0438\u0441\u0430\u0442\u044c \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434, \u043d\u0443 \u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u043e \u043c\u044b\u0441\u043b\u0438\u0442\u044c \ud83d\ude42<\/p>\n<p>\u042f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043e\u0439\u0442\u0438 \u043a \u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0443 <strong>\u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e \u0438 \u0431\u0435\u0437 \u0431\u043e\u043b\u0438<\/strong> \u2014 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043b\u0438\u0447\u043d\u043e\u0433\u043e \u043e\u043f\u044b\u0442\u0430 Java-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0438 \u043f\u0440\u0435\u043f\u043e\u0434\u0430\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<h3>\u041f\u043e\u0447\u0435\u043c\u0443 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u043f\u0443\u0433\u0430\u044e\u0442 \u0438\u043c\u0435\u043d\u043d\u043e Java-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432<\/h3>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b\u0438 \u0440\u0435\u0448\u0430\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0438 \u043d\u0430 Java \u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043b\u0438 \u0441\u0432\u043e\u0439 \u043a\u043e\u0434 \u0441 Python (\u0430 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043b\u0430\u0434\u043a\u0438\u0439 \u0440\u0430\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0441\u0430\u0445\u0430\u0440\u0430), \u0432\u044b \u0437\u043d\u0430\u0435\u0442\u0435 \u0431\u043e\u043b\u044c:<\/p>\n<ul>\n<li>\n<p>10 \u0441\u0442\u0440\u043e\u0447\u0435\u043a \u0432\u043c\u0435\u0441\u0442\u043e 1 &#8212; \u0431\u044b\u043b \u0432 \u0448\u043e\u043a\u0435, \u043a\u043e\u0433\u0434\u0430 \u0443\u0432\u0438\u0434\u0435\u043b,<\/p>\n<\/li>\n<li>\n<p><code>Map&lt;String, List&lt;Integer&gt;&gt;<\/code> \u2014 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u0442\u0440\u0430\u0448\u043d\u0435\u0435, \u0447\u0435\u043c \u0441\u0430\u043c\u0430 \u0437\u0430\u0434\u0430\u0447\u0430,<\/p>\n<\/li>\n<li>\n<p>\u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0437\u0430\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0433\u0443\u0433\u043b\u0438\u0442\u044c <code>Java how to initialize HashMap of Lists<\/code> \u0432 2025 \u0433\u043e\u0434\u0443-\u0442\u043e.<\/p>\n<\/li>\n<\/ul>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, Java-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0447\u0430\u0441\u0442\u043e \u043f\u0440\u043e \u00ab\u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0443\u00bb \u2014 \u0438 \u0441\u043b\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u043c\u044b\u0448\u043b\u0435\u043d\u0438\u0435 &#171;\u0433\u0440\u0430\u0444\u044b \u0438 \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0438&#187;.<\/p>\n<h3>\u0427\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0443\u0436\u043d\u043e \u0437\u043d\u0430\u0442\u044c Java-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0443<\/h3>\n<p>\u0412\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u043e\u0440\u0435\u0448\u0430\u0442\u044c \u0432\u0435\u0441\u044c LeetCode, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0430 <strong>5 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0442\u0435\u043c\u0430\u0445<\/strong>:<\/p>\n<ol>\n<li>\n<p><strong>\u0421\u0442\u0440\u043e\u043a\u0438 \u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u044b<\/strong> \u2014 \u043e\u0441\u043d\u043e\u0432\u0430 \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435\u0445 \u0437\u0430\u0434\u0430\u0447<\/p>\n<\/li>\n<li>\n<p><strong>\u0425\u0435\u0448-\u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430<\/strong> (<code>HashMap<\/code>, <code>HashSet<\/code>) \u2014 \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430<\/p>\n<\/li>\n<li>\n<p><strong>\u041e\u0447\u0435\u0440\u0435\u0434\u0438 \u0438 \u0441\u0442\u0435\u043a\u0438<\/strong> (<code>Deque<\/code>, <code>Queue<\/code>, <code>Stack<\/code>)<\/p>\n<\/li>\n<li>\n<p><strong>\u0414\u0435\u0440\u0435\u0432\u044c\u044f \u0438 \u0433\u0440\u0430\u0444\u044b<\/strong> (\u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043e\u0431\u0445\u043e\u0434\u044b \u0438 \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u044f)<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u043e\u0438\u0441\u043a, \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430, \u0434\u0432\u0430 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f, \u0441\u043a\u043e\u043b\u044c\u0437\u044f\u0449\u0435\u0435 \u043e\u043a\u043d\u043e<\/strong><\/p>\n<\/li>\n<\/ol>\n<p>\u0410 \u0435\u0449\u0451 \u2014 \u043d\u0430\u0443\u0447\u0438\u0442\u0435\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b <strong>\u0443\u043c\u043d\u043e<\/strong>, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e:<\/p>\n<ul>\n<li>\n<p><code>PriorityQueue<\/code> \u0434\u043b\u044f \u043a\u0443\u0447\u0438,<\/p>\n<\/li>\n<li>\n<p><code>Deque<\/code> \u043a\u0430\u043a \u0434\u0432\u0443\u0445\u0441\u0442\u043e\u0440\u043e\u043d\u043d\u044e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c,<\/p>\n<\/li>\n<li>\n<p><code>Map.computeIfAbsent<\/code> \u2014 \u0434\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<\/li>\n<\/ul>\n<h3>\u041c\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434: \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u0431\u0435\u0437 \u0431\u043e\u043b\u0438<\/h3>\n<h4>1. \u0414\u0435\u043b\u0430\u0442\u044c \u043d\u0435 \u201c\u0434\u043b\u044f \u0433\u0430\u043b\u043e\u0447\u043a\u0438\u201d, \u0430 \u043f\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0443<\/h4>\n<p>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u2014 \u044d\u0442\u043e \u043d\u0435 \u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447, \u0430 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 <strong>\u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432<\/strong>. \u0426\u0435\u043b\u044c: \u043d\u0435 \u0438\u0437\u043e\u0431\u0440\u0435\u0442\u0430\u0442\u044c, \u0430 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0442\u044c.<\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<ul>\n<li>\n<p>\u0421\u043b\u043e\u0432\u0430\u0440\u0438 \u2192 \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u2192 <code>Map.getOrDefault(...)<\/code><\/p>\n<\/li>\n<li>\n<p>\u0421\u0442\u0435\u043a \u2192 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u043a\u043e\u0431\u043e\u043a \u2192 <code>Stack&lt;Character&gt;<\/code><\/p>\n<\/li>\n<li>\n<p>BFS \u2192 <code>Queue&lt;TreeNode&gt;<\/code>, \u043e\u0431\u0445\u043e\u0434 \u043f\u043e \u0443\u0440\u043e\u0432\u043d\u044f\u043c<\/p>\n<\/li>\n<\/ul>\n<p>\u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 12 \u0442\u0438\u043f\u043e\u0432\u044b\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0437\u0430\u0434\u0430\u0447, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043a\u0440\u043e\u044e\u0442 &gt;70% \u0440\u0435\u0448\u0435\u043d\u0438\u0439. \u0412\u0430\u0448\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u043b\u0438\u0448\u044c \u044d\u0442\u043e\u0442 \u0448\u0430\u0431\u043b\u043e\u043d \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c. \u0412\u043e\u0442 \u043e\u043d\u0438, \u0441\u043b\u0435\u0432\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u043e: <\/p>\n<ol>\n<li>\n<p>\u0414\u0432\u0430 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f;<\/p>\n<\/li>\n<li>\n<p>\u0421\u043a\u043e\u043b\u044c\u0437\u044f\u0449\u0435\u0435 \u043e\u043a\u043d\u043e;<\/p>\n<\/li>\n<li>\n<p>\u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0438 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0439 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c (\u043f\u043e\u0438\u0441\u043a \u0446\u0438\u043a\u043b\u0430);<\/p>\n<\/li>\n<li>\n<p>\u0421\u0442\u0435\u043a \u0434\u043b\u044f \u0441\u043a\u043e\u0431\u043e\u043a \/ \u041c\u043e\u043d\u043e\u0442\u043e\u043d\u043d\u044b\u0439 \u0441\u0442\u0435\u043a;<\/p>\n<\/li>\n<li>\n<p>\u0411\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u043f\u043e\u0438\u0441\u043a (\u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443\/\u043f\u043e \u043e\u0442\u0432\u0435\u0442\u0443);<\/p>\n<\/li>\n<li>\n<p>\u0425\u0435\u0448-\u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0434\u043b\u044f \u043f\u043e\u0434\u0441\u0447\u0435\u0442\u0430\/\u043f\u043e\u0438\u0441\u043a\u0430;<\/p>\n<\/li>\n<li>\n<p>\u041e\u0431\u0440\u0430\u0442\u043d\u044b\u0439 \u043e\u0442\u0441\u0447\u0435\u0442;<\/p>\n<\/li>\n<li>\n<p>\u041e\u0431\u0445\u043e\u0434 \u0432 \u0448\u0438\u0440\u0438\u043d\u0443 (BFS) \/ \u041e\u0431\u0445\u043e\u0434 \u0432 \u0433\u043b\u0443\u0431\u0438\u043d\u0443 (DFS) (\u043f\u043e \u0434\u0435\u0440\u0435\u0432\u0443\/\u043f\u043e \u0433\u0440\u0430\u0444\u0443);<\/p>\n<\/li>\n<li>\n<p>\u0414\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 (\u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0438 \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u044f \u0441 \u043c\u0435\u043c\u043e\u0438\u0437\u0430\u0446\u0438\u0435\u0439);<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0438\u0441\u043a <code>k<\/code> \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 (\u043a\u0443\u0447\u0430\/\u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043d\u0430\u044f \u043e\u0447\u0435\u0440\u0435\u0434\u044c);<\/p>\n<\/li>\n<li>\n<p>\u0416\u0430\u0434\u043d\u044b\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \/ \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438;<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0435\u0444\u0438\u043a\u0441\u043d\u044b\u0435 \u0441\u0443\u043c\u043c\u044b \/ \u041c\u0430\u0441\u0441\u0438\u0432 \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u0435\u0439.<\/p>\n<\/li>\n<\/ol>\n<p>\u0422\u0430\u043a \u0436\u0435 \u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0435\u0441\u0442\u044c \u0438 \u0441\u0432\u043e\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430. \u041d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 <strong>\u0414\u0432\u0443\u0445 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439<\/strong>:<\/p>\n<ul>\n<li>\n<p><strong>\u041a\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c<\/strong>: \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u044b \u0441 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c\u0438, \u043f\u043e\u0438\u0441\u043a \u043f\u0430\u0440\/\u0442\u0440\u043e\u0435\u043a \u0447\u0438\u0441\u0435\u043b.<\/p>\n<\/li>\n<li>\n<p><strong>\u0427\u0442\u043e \u0443\u0447\u0438\u0442\u044c<\/strong>: \u043e\u0434\u0438\u043d \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0432 \u043d\u0430\u0447\u0430\u043b\u0435, \u0434\u0440\u0443\u0433\u043e\u0439 \u0432\u00a0\u043a\u043e\u043d\u0446\u0435 \u2192 \u0434\u0432\u0438\u0433\u0430\u044e\u0442\u0441\u044f \u043d\u0430\u0432\u0441\u0442\u0440\u0435\u0447\u0443 \u0438\u043b\u0438 \u0432 \u043e\u0434\u043d\u043e\u043c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>\u0422\u0438\u043f\u043e\u0432\u044b\u0435 \u0441\u043b\u0443\u0447\u0430\u0438<\/strong>: \u043d\u0430\u0439\u0442\u0438 \u043f\u0430\u0440\u0443 \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0441\u0443\u043c\u043c\u043e\u0439; \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u044b, \u0441\u0442\u0440\u043e\u043a\u0438; \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0434\u0443\u0431\u043b\u0438\u043a\u0430\u0442\u044b \/ \u043f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b; \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438 \u0441\u0442\u0440\u043e\u043a\u0430 \u043f\u0430\u043b\u0438\u043d\u0434\u0440\u043e\u043c\u043e\u043c, \u0441\u043b\u0438\u0442\u044c \u0434\u0432\u0430 \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043c\u0430\u0441\u0441\u0438\u0432\u0430.<\/p>\n<\/li>\n<li>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0444\u043e\u0440\u043c\u044b:<\/p>\n<p>1) \u041e\u0431\u0430 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f \u0434\u0432\u0438\u0433\u0430\u044e\u0442\u0441\u044f \u043a \u0446\u0435\u043d\u0442\u0440\u0443:<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"java\">int left = 0; int reght = arr.length - 1; while (left &lt; right) {   \/\/ \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430   if (\u0443\u0441\u043b\u043e\u0432\u0438\u0435) {     left++;   } else {     right--;   } }<\/code><\/pre>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043f\u0430\u0440\u0443 \u0441 \u0441\u0443\u043c\u043c\u043e\u0439, \u043f\u0430\u043b\u0438\u043d\u0434\u0440\u043e\u043c\u043d\u043e\u0441\u0442\u044c, \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u0438<\/p>\n<p>\u0418 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435, \u0434\u0443\u043c\u0430\u044e \u0432\u044b \u043f\u043e\u043d\u044f\u043b\u0438.<\/p>\n<h4>2. \u041f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u0435 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437 \u043e\u0448\u0438\u0431\u043e\u043a<\/h4>\n<p>\u0420\u0435\u0448\u0438\u043b\u0438 \u0437\u0430\u0434\u0430\u0447\u0443? \u041e\u0442\u043b\u043e\u0436\u0438\u0442\u0435. \u0427\u0435\u0440\u0435\u0437 2 \u0434\u043d\u044f \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u043f\u0440\u043e\u0440\u0435\u0448\u0430\u0442\u044c \u0435\u0451 \u0437\u0430\u043d\u043e\u0432\u043e. \u0422\u043e\u043b\u044c\u043a\u043e \u0442\u0430\u043a \u0448\u0430\u0431\u043b\u043e\u043d \u0443\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043c\u043e\u0437\u0433.<\/p>\n<p>\u0422\u0430\u043a \u0436\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0447\u043a\u0443:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p align=\"center\"><strong>\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"center\"><strong>\u041f\u0430\u0442\u0442\u0435\u0440\u043d<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"center\"><strong>\u0413\u0434\u0435 \u0442\u0443\u043f\u0438\u043b<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"center\"><strong>\u041a\u0430\u043a \u0440\u0435\u0448\u0438\u043b<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">125. Valid Palindrome<\/p>\n<\/td>\n<td>\n<p align=\"center\">\u0414\u0432\u0430 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0421 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u0441\u043f\u0435\u0446 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0438 \u0446\u0438\u0444\u0440<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0434\u0432\u0430 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0432\u0438\u0433\u0430\u044e\u0442\u0441\u044f \u0441 \u0434\u0432\u0443\u0445 \u043a\u043e\u043d\u0446\u043e\u0432&#8230;<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0427\u0435\u043c \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u0435\u0435 \u0432\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u0440\u0430\u0441\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u044f, \u0442\u0435\u043c \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0431\u0443\u0434\u0435\u0442\u0435 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u0442\u044c \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u044b.<\/p>\n<h4>3. \u041d\u0435 \u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0430\u043c\u0443\u044e \u0441\u043b\u043e\u0436\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443 \u0432 \u043b\u0435\u043d\u0442\u0435<\/h4>\n<p>\u041b\u0443\u0447\u0448\u0435 5 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0437\u0430\u0434\u0430\u0447 \u0432 \u0434\u0435\u043d\u044c, \u0447\u0435\u043c \u043e\u0434\u043d\u0430 \u00abHard\u00bb \u0441 \u0431\u043e\u043b\u044c\u044e \u0438 \u0432\u044b\u0433\u043e\u0440\u0430\u043d\u0438\u0435\u043c. \u0417\u0430\u0447\u0430\u0441\u0442\u0443\u044e, \u0437\u0430\u0434\u0430\u0447\u043a\u0438 \u0443\u0440\u043e\u0432\u043d\u044f Hard \u0434\u043b\u044f \u043d\u0430\u0431\u0438\u0432\u0448\u0438\u0445 \u0440\u0443\u043a\u0443 \u0440\u0435\u0431\u044f\u0442. <\/p>\n<p>\u0414\u0430 \u0438 \u0432\u043e\u043e\u0431\u0449\u0435, \u0430 \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043b\u0435\u0433\u043a\u043e, \u0441\u0440\u0435\u0434\u043d\u0435 \u0438\u043b\u0438 \u0441\u043b\u043e\u0436\u043d\u043e? LeetCode \u0438 CodeRun \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043f\u0440\u043e\u0432\u043e\u0434\u044f\u0442 \u043f\u0435\u0440\u0435\u043e\u0446\u0435\u043d\u043a\u0443 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438.<\/p>\n<h3>\u0424\u0438\u0448\u043a\u0438 Java, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u043e \u0443\u043f\u0440\u043e\u0449\u0430\u044e\u0442 \u0436\u0438\u0437\u043d\u044c<\/h3>\n<p>\u0412\u043e\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 <strong>\u0432 100% \u0441\u043b\u0443\u0447\u0430\u0435\u0432<\/strong> \u0434\u0435\u043b\u0430\u044e\u0442 \u043a\u043e\u0434 \u043a\u043e\u0440\u043e\u0447\u0435:<\/p>\n<ul>\n<li>\n<p><code>StringBuilder<\/code> \u0432\u043c\u0435\u0441\u0442\u043e \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441\u0442\u0440\u043e\u043a<\/p>\n<\/li>\n<li>\n<p><code>Map.computeIfAbsent(key, k -&gt; new ArrayList&lt;&gt;())<\/code> \u2014 \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e<\/p>\n<\/li>\n<li>\n<p><code>Deque<\/code> \u043a\u0430\u043a \u0441\u0442\u0435\u043a \u0438\u043b\u0438 \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0441 \u043e\u0431\u0435\u0438\u0445 \u0441\u0442\u043e\u0440\u043e\u043d<\/p>\n<\/li>\n<li>\n<p><code>List.subList(start, end)<\/code> \u2014 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043f\u0440\u0438 \u0437\u0430\u0434\u0430\u0447\u0430\u0445 \u043d\u0430 \u0441\u043a\u043e\u043b\u044c\u0437\u044f\u0449\u0435\u0435 \u043e\u043a\u043d\u043e<\/p>\n<\/li>\n<li>\n<p><code>PriorityQueue&lt;&gt;(Comparator.comparingInt(...))<\/code> \u2014 \u0433\u0438\u0431\u043a\u043e \u0438 \u0447\u0438\u0442\u0430\u0435\u043c\u043e<\/p>\n<\/li>\n<\/ul>\n<h3>\u041f\u0440\u0438\u043c\u0435\u0440: \u043f\u0435\u0440\u0432\u0430\u044f \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u0431\u0443\u043a\u0432\u0430 \u0432 \u0441\u0442\u0440\u043e\u043a\u0435<\/h3>\n<p><strong>\u0417\u0430\u0434\u0430\u0447\u0430:<\/strong><br \/> \u041d\u0430\u0439\u0442\u0438 \u0438\u043d\u0434\u0435\u043a\u0441 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043d\u0435\u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0435\u0433\u043e\u0441\u044f \u0441\u0438\u043c\u0432\u043e\u043b\u0430 \u0432 \u0441\u0442\u0440\u043e\u043a\u0435.<\/p>\n<p><strong>\u041f\u043b\u0430\u043d:<\/strong><\/p>\n<ol>\n<li>\n<p>\u041f\u0440\u043e\u0439\u0442\u0438 \u0441\u0442\u0440\u043e\u043a\u0443 \u0438 \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0447\u0430\u0441\u0442\u043e\u0442\u044b (<code>Map<\/code>)<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0439\u0442\u0438 \u0441\u0442\u0440\u043e\u043a\u0443 \u0435\u0449\u0451 \u0440\u0430\u0437 \u2014 \u043d\u0430\u0439\u0442\u0438 \u043f\u0435\u0440\u0432\u044b\u0439, \u0447\u0435\u0439 count = 1<\/p>\n<\/li>\n<\/ol>\n<p><strong>Java-\u043a\u043e\u0434:<\/strong><\/p>\n<pre><code class=\"java\">public int firstUniqChar(String s) {     Map count = new HashMap&amp;lt;&amp;gt;();     for (char c : s.toCharArray()) {         count.put(c, count.getOrDefault(c, 0) + 1);     }     for (int i = 0; i &amp;lt; s.length(); i++) {         if (count.get(s.charAt(i)) == 1) {             return i;         }     }     return -1; } <\/code><\/pre>\n<p><strong>\u041f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u0435:<\/strong><\/p>\n<ul>\n<li>\n<p>\u0412 \u043f\u0435\u0440\u0432\u043e\u043c \u0446\u0438\u043a\u043b\u0435 \u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0447\u0430\u0441\u0442\u043e\u0442\u044b \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u0430<\/p>\n<\/li>\n<li>\n<p>\u0412\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u2014 \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u043f\u0435\u0440\u0432\u044b\u0439, \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e <code>count = 1<\/code><\/p>\n<\/li>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <code>getOrDefault()<\/code> \u2014 \u043a\u043b\u0430\u0441\u0441\u0438\u043a\u0430 \u0437\u0430\u0434\u0430\u0447 \u043d\u0430 \u0441\u0447\u0451\u0442\u0447\u0438\u043a\u0438<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u041f\u043e\u0447\u0435\u043c\u0443 \u044d\u0442\u043e \u0432\u0430\u0436\u043d\u043e:<\/strong><\/p>\n<ul>\n<li>\n<p>\u042d\u0442\u043e \u043a\u043b\u0430\u0441\u0441\u0438\u043a\u0430: \u0441\u0447\u0451\u0442\u0447\u0438\u043a\u0438, \u043f\u0440\u043e\u0445\u043e\u0434\u044b, \u043c\u0430\u043f\u0430.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043c\u044b\u0448\u043b\u0435\u043d\u0438\u0435 \u0438 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 Java.<\/p>\n<\/li>\n<\/ul>\n<p>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u2014 \u044d\u0442\u043e \u043d\u0435 \u0441\u0442\u0440\u0430\u0448\u043d\u043e. \u042d\u0442\u043e <strong>\u043d\u0430\u0432\u044b\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0431\u0438\u0446\u0443\u0445\u0430<\/strong>: \u0441 \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u0435\u043c \u0438 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u043e\u0439. \u0414\u043b\u044f Java-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u2014 \u043e\u0441\u0432\u043e\u0438\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0438 \u043d\u0430\u0443\u0447\u0438\u0442\u044c\u0441\u044f <strong>\u0434\u0443\u043c\u0430\u0442\u044c \u043a\u0430\u043a \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0438\u0441\u0442<\/strong>, \u043d\u0435 \u0442\u0435\u0440\u044f\u044f \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430.<\/p>\n<p>\u0414\u0430 \u0438 \u0432 \u0446\u0435\u043b\u043e\u043c, \u043d\u0435 \u0437\u0430\u043c\u0435\u0447\u0430\u043b\u0438 \u043b\u0438 \u0432\u044b, \u0447\u0442\u043e \u043f\u0440\u043e\u0449\u0435 \u043f\u043e\u0442\u0440\u0430\u0442\u0438\u0442\u044c \u043c\u0435\u0441\u044f\u0446-\u0434\u0432\u0430 \u043d\u0430 \u00ab\u0437\u0443\u0431\u0440\u0435\u0436\u043a\u0443\u00bb \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432 \u0438 \u0438\u0434\u0442\u0438 \u0432 \u0431\u0438\u0433\u0442\u0435\u0445, \u0447\u0435\u043c \u043d\u0430\u0431\u0438\u0432\u0430\u0442\u044c \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432\u044b\u0439 \u043e\u043f\u044b\u0442? \u041d\u0435\u0442? \u0417\u0430\u0434\u0443\u043c\u0430\u0439\u0442\u0435\u0441\u044c.<\/p>\n<p>\u0423\u0447\u0438\u0442\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b, \u0431\u0443\u0434\u044c\u0442\u0435 \u0441\u0438\u043b\u044c\u043d\u044b \u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u043e\u0441\u0442\u0430\u0432\u0430\u0439\u0442\u0435\u0441\u044c \u043d\u0430 \u0448\u0430\u0433 \u0432\u043f\u0435\u0440\u0435\u0434\u0438. \u0423\u0441\u043f\u0435\u0445\u043e\u0432 \u0432 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0438!<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430 \u0436\u0438\u0437\u043d\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0439\u0442\u0435\u0441\u044c \u043d\u0430 \u043c\u043e\u0439 \u0422\u0413 \u043a\u0430\u043d\u0430\u043b &#8212;\u00a0<a href=\"https:\/\/t.me\/TrueRuslan_Blog\" rel=\"noopener noreferrer nofollow\">\u041d\u0435\u043c\u044b\u043a\u0438\u043d.\u041f\u0440\u043e\u0434\u0430\u043a\u0448\u043d<\/a><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><\/p>\n<div class=\"tm-article-poll-container\"><!--[--><\/p>\n<div class=\"tm-article-poll tm-article-poll_variant-bordered\">\n<div class=\"tm-notice tm-notice_positive tm-article-poll__notice\"><!----><\/p>\n<div class=\"tm-notice__inner\"><!----><\/p>\n<div class=\"tm-notice__content\" data-test-id=\"notice-content\"><!--[--><span>\u0422\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u043f\u0440\u043e\u0441\u0435. <a rel=\"nofollow\" href=\"\/kek\/v1\/auth\/habrahabr\/?back=\/ru\/articles\/932998\/&#038;hl=ru\">\u0412\u043e\u0439\u0434\u0438\u0442\u0435<\/a>, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.<\/span><!--]--><\/div>\n<\/div>\n<\/div>\n<p><!--[--><\/p>\n<div class=\"tm-article-poll__header\">\u041a\u0430\u043a \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u0441\u044c \u043a \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u0435\u043a\u0446\u0438\u0438 \u043d\u0430 \u0441\u043e\u0431\u0435\u0441\u0435?<\/div>\n<div class=\"tm-article-poll__answers\"><!--[--><\/p>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">27.91%<\/span><span class=\"tm-article-poll__answer-label\">\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e<\/span><span class=\"tm-article-poll__answer-votes\">12<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width: 27.91%\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">27.91%<\/span><span class=\"tm-article-poll__answer-label\">\u0412\u0440\u043e\u0434\u0435 \u043e\u043a, \u043d\u043e \u0441 \u043c\u043e\u0438\u043c-\u0442\u043e \u043e\u043f\u044b\u0442\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0438 \u0431\u0435\u0437 \u043d\u0438\u0445<\/span><span class=\"tm-article-poll__answer-votes\">12<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width: 27.91%\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent tm-article-poll__answer-percent_winning\">44.19%<\/span><span class=\"tm-article-poll__answer-label\">\u041b\u0438\u0448\u043d\u044f\u044f \u0442\u0440\u0430\u0442\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u0438<\/span><span class=\"tm-article-poll__answer-votes\">19<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress tm-article-poll__answer-progress_winning\" style=\"width: 44.19%\"><\/div>\n<\/div>\n<\/div>\n<p><!--]--><\/div>\n<div class=\"tm-article-poll__stats\"> \u041f\u0440\u043e\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043b\u0438 43 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.    \u0412\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u043b\u0438\u0441\u044c 7 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439. <\/div>\n<p><!--]--><\/div>\n<p><!--]--><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/932998\/\"> https:\/\/habr.com\/ru\/articles\/932998\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-473340","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/473340","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=473340"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/473340\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=473340"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=473340"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=473340"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}