{"id":3250,"date":"2025-01-17T06:42:53","date_gmt":"2025-01-17T06:42:53","guid":{"rendered":"https:\/\/gnomeledge.com\/QH2301B\/?p=3250"},"modified":"2025-01-17T06:43:54","modified_gmt":"2025-01-17T06:43:54","slug":"hackerrank-tutorial-10-compare-the-triplets-challenge","status":"publish","type":"post","link":"https:\/\/gnomeledge.com\/QH2301B\/2025\/01\/17\/hackerrank-tutorial-10-compare-the-triplets-challenge\/","title":{"rendered":"[HackerRank] Tutorial 10:\u00a0\u201cCompare the Triplets\u201d Challenge"},"content":{"rendered":"\n<p><strong>Step 1 \u2013 Launch the HackerRank Website and \u201cSign In\u201d.<\/strong>&nbsp;<strong>Ref:&nbsp;<a href=\"https:\/\/www.hackerrank.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.hackerrank.com\/<\/a><\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"475\" src=\"https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2025\/01\/PS3_1-1024x475.jpg\" alt=\"\" class=\"wp-image-3252\" srcset=\"https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2025\/01\/PS3_1-1024x475.jpg 1024w, https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2025\/01\/PS3_1-300x139.jpg 300w, https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2025\/01\/PS3_1-768x357.jpg 768w, https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2025\/01\/PS3_1-1536x713.jpg 1536w, https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2025\/01\/PS3_1-2048x951.jpg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong><strong>Step 2 \u2013 Click into \u201cContinue Preparation\u201d under Problem Solving. Choose \u201cCompare the Triplets\u201d Challenge.<\/strong><\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"476\" src=\"https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2025\/01\/PS3_2-1024x476.jpg\" alt=\"\" class=\"wp-image-3253\" srcset=\"https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2025\/01\/PS3_2-1024x476.jpg 1024w, https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2025\/01\/PS3_2-300x139.jpg 300w, https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2025\/01\/PS3_2-768x357.jpg 768w, https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2025\/01\/PS3_2-1536x714.jpg 1536w, https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2025\/01\/PS3_2-2048x952.jpg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong>Step 3 \u2013 Read the Instructions Carefully.<\/strong><\/p>\n\n\n\n<p>Change the&nbsp;<strong>Programming Language to Python 3<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"486\" src=\"https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2025\/01\/PS3_3a-1024x486.jpg\" alt=\"\" class=\"wp-image-3254\" srcset=\"https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2025\/01\/PS3_3a-1024x486.jpg 1024w, https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2025\/01\/PS3_3a-300x142.jpg 300w, https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2025\/01\/PS3_3a-768x364.jpg 768w, https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2025\/01\/PS3_3a-1536x728.jpg 1536w, https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2025\/01\/PS3_3a.jpg 1900w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"814\" height=\"904\" src=\"https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2025\/01\/PS3_3b.jpg\" alt=\"\" class=\"wp-image-3255\" srcset=\"https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2025\/01\/PS3_3b.jpg 814w, https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2025\/01\/PS3_3b-270x300.jpg 270w, https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2025\/01\/PS3_3b-768x853.jpg 768w\" sizes=\"auto, (max-width: 814px) 100vw, 814px\" \/><\/figure>\n\n\n\n<p><strong>Step 4 \u2013 List the Requirements and Constraints in a Notepad in simple words. Learn to take notes.<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"529\" src=\"https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2025\/01\/PS3_4-1024x529.jpg\" alt=\"\" class=\"wp-image-3256\" srcset=\"https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2025\/01\/PS3_4-1024x529.jpg 1024w, https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2025\/01\/PS3_4-300x155.jpg 300w, https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2025\/01\/PS3_4-768x397.jpg 768w, https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2025\/01\/PS3_4.jpg 1347w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong>Step 5 \u2013 Convert What You Understand of the&nbsp;<strong>Requirements and Constraints<\/strong>&nbsp;into code<\/strong>.<\/p>\n\n\n\n<p>With a basic understanding that we will be <strong>comparing the elements in two different list<\/strong>, and <strong>assign scores to Alice and Bob based on internal rules<\/strong>, we can come to an understanding that to get the machine to do a series of task, we need to <strong>use computational time<\/strong> &#8211; this means we need to <strong>cast a loop<\/strong>.<\/p>\n\n\n\n<p>As <strong>both list are of the same length<\/strong>. We can <strong>use the length of one list, to define how many cycles of compute time the loop shall run<\/strong>.<\/p>\n\n\n\n<p><em>for i in range(<strong>len(a)<\/strong>):<\/em><\/p>\n\n\n\n<p><strong>Convert the rules to assign scores<\/strong> to Alice and Bob.<\/p>\n\n\n\n<p><em>if a[i] &gt; b[i]:<\/em><\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <em>alice_scores += 1<\/em><\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; <em>elif a[i] &lt; b[i]:<\/em><\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <em>bob_scores += 1<\/em><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"793\" src=\"https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2025\/01\/PS3_5-1024x793.jpg\" alt=\"\" class=\"wp-image-3257\" srcset=\"https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2025\/01\/PS3_5-1024x793.jpg 1024w, https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2025\/01\/PS3_5-300x232.jpg 300w, https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2025\/01\/PS3_5-768x595.jpg 768w, https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2025\/01\/PS3_5.jpg 1051w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong>Step 6 \u2013 Click \u201cRun Code\u201d to Test Your Code. Do Note if you submit code with errors, you will lose points. So \u201cRun Code\u201d first to ensure everything works.<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"629\" src=\"https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2025\/01\/PS3_6-1024x629.jpg\" alt=\"\" class=\"wp-image-3258\" srcset=\"https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2025\/01\/PS3_6-1024x629.jpg 1024w, https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2025\/01\/PS3_6-300x184.jpg 300w, https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2025\/01\/PS3_6-768x472.jpg 768w, https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2025\/01\/PS3_6.jpg 1042w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong>Step 7 \u2013 Once you have tested that your code works, \u201cSubmit Code\u201d to clear the challenge and earn some Hacker points.<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"798\" src=\"https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2025\/01\/PS3_7-1024x798.jpg\" alt=\"\" class=\"wp-image-3259\" srcset=\"https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2025\/01\/PS3_7-1024x798.jpg 1024w, https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2025\/01\/PS3_7-300x234.jpg 300w, https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2025\/01\/PS3_7-768x598.jpg 768w, https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2025\/01\/PS3_7.jpg 1045w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Step 1 \u2013 Launch the HackerRank Website and \u201cSign In\u201d.&nbsp;Ref:&nbsp;https:\/\/www.hackerrank.com\/ Step 2 \u2013 Click into \u201cContinue Preparation\u201d under Problem Solving. Choose \u201cCompare the Triplets\u201d Challenge. Step 3 \u2013 Read the Instructions Carefully. Change the&nbsp;Programming Language to Python 3. Step 4 \u2013 List the Requirements and Constraints in a Notepad in simple words. Learn to take [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":3251,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[374,360,365,370,3,256,174,366,8,371],"tags":[],"class_list":["post-3250","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-algorithms-problem-solving","category-ambition","category-competitive-programming","category-hackerrank","category-ite","category-learning-through-experimentations","category-methods-and-techniques","category-ranking-up","category-student-support","category-tutorials"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>[HackerRank] Tutorial 10:\u00a0\u201cCompare the Triplets\u201d Challenge - Gnome Ledge<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/gnomeledge.com\/QH2301B\/2025\/01\/17\/hackerrank-tutorial-10-compare-the-triplets-challenge\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"[HackerRank] Tutorial 10:\u00a0\u201cCompare the Triplets\u201d Challenge - Gnome Ledge\" \/>\n<meta property=\"og:description\" content=\"Step 1 \u2013 Launch the HackerRank Website and \u201cSign In\u201d.&nbsp;Ref:&nbsp;https:\/\/www.hackerrank.com\/ Step 2 \u2013 Click into \u201cContinue Preparation\u201d under Problem Solving. Choose \u201cCompare the Triplets\u201d Challenge. Step 3 \u2013 Read the Instructions Carefully. Change the&nbsp;Programming Language to Python 3. Step 4 \u2013 List the Requirements and Constraints in a Notepad in simple words. Learn to take [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/gnomeledge.com\/QH2301B\/2025\/01\/17\/hackerrank-tutorial-10-compare-the-triplets-challenge\/\" \/>\n<meta property=\"og:site_name\" content=\"Gnome Ledge\" \/>\n<meta property=\"article:published_time\" content=\"2025-01-17T06:42:53+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-01-17T06:43:54+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2025\/01\/DALL\u00b7E-2025-01-17-14.34.43-A-boy-and-a-girl-sitting-across-from-each-other-at-a-table-energetically-playing-a-game-of-scissors-paper-stone.-Both-have-playful-and-competitive-.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"1024\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"Wei Jing HO\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Wei Jing HO\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/gnomeledge.com\/QH2301B\/2025\/01\/17\/hackerrank-tutorial-10-compare-the-triplets-challenge\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/gnomeledge.com\/QH2301B\/2025\/01\/17\/hackerrank-tutorial-10-compare-the-triplets-challenge\/\"},\"author\":{\"name\":\"Wei Jing HO\",\"@id\":\"https:\/\/gnomeledge.com\/QH2301B\/#\/schema\/person\/6895e6c29fbf0423d8b9b25fe6ead8f5\"},\"headline\":\"[HackerRank] Tutorial 10:\u00a0\u201cCompare the Triplets\u201d Challenge\",\"datePublished\":\"2025-01-17T06:42:53+00:00\",\"dateModified\":\"2025-01-17T06:43:54+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/gnomeledge.com\/QH2301B\/2025\/01\/17\/hackerrank-tutorial-10-compare-the-triplets-challenge\/\"},\"wordCount\":258,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/gnomeledge.com\/QH2301B\/#organization\"},\"image\":{\"@id\":\"https:\/\/gnomeledge.com\/QH2301B\/2025\/01\/17\/hackerrank-tutorial-10-compare-the-triplets-challenge\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2025\/01\/DALL\u00b7E-2025-01-17-14.34.43-A-boy-and-a-girl-sitting-across-from-each-other-at-a-table-energetically-playing-a-game-of-scissors-paper-stone.-Both-have-playful-and-competitive-.webp\",\"articleSection\":[\"Algorithms \/ Problem Solving\",\"Ambition\",\"Competitive Programming\",\"HackerRank\",\"ITE\",\"Learning through Experimentations\",\"Methods and Techniques\",\"Ranking Up\",\"Student Support\",\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/gnomeledge.com\/QH2301B\/2025\/01\/17\/hackerrank-tutorial-10-compare-the-triplets-challenge\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/gnomeledge.com\/QH2301B\/2025\/01\/17\/hackerrank-tutorial-10-compare-the-triplets-challenge\/\",\"url\":\"https:\/\/gnomeledge.com\/QH2301B\/2025\/01\/17\/hackerrank-tutorial-10-compare-the-triplets-challenge\/\",\"name\":\"[HackerRank] Tutorial 10:\u00a0\u201cCompare the Triplets\u201d Challenge - Gnome Ledge\",\"isPartOf\":{\"@id\":\"https:\/\/gnomeledge.com\/QH2301B\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/gnomeledge.com\/QH2301B\/2025\/01\/17\/hackerrank-tutorial-10-compare-the-triplets-challenge\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/gnomeledge.com\/QH2301B\/2025\/01\/17\/hackerrank-tutorial-10-compare-the-triplets-challenge\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2025\/01\/DALL\u00b7E-2025-01-17-14.34.43-A-boy-and-a-girl-sitting-across-from-each-other-at-a-table-energetically-playing-a-game-of-scissors-paper-stone.-Both-have-playful-and-competitive-.webp\",\"datePublished\":\"2025-01-17T06:42:53+00:00\",\"dateModified\":\"2025-01-17T06:43:54+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/gnomeledge.com\/QH2301B\/2025\/01\/17\/hackerrank-tutorial-10-compare-the-triplets-challenge\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/gnomeledge.com\/QH2301B\/2025\/01\/17\/hackerrank-tutorial-10-compare-the-triplets-challenge\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/gnomeledge.com\/QH2301B\/2025\/01\/17\/hackerrank-tutorial-10-compare-the-triplets-challenge\/#primaryimage\",\"url\":\"https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2025\/01\/DALL\u00b7E-2025-01-17-14.34.43-A-boy-and-a-girl-sitting-across-from-each-other-at-a-table-energetically-playing-a-game-of-scissors-paper-stone.-Both-have-playful-and-competitive-.webp\",\"contentUrl\":\"https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2025\/01\/DALL\u00b7E-2025-01-17-14.34.43-A-boy-and-a-girl-sitting-across-from-each-other-at-a-table-energetically-playing-a-game-of-scissors-paper-stone.-Both-have-playful-and-competitive-.webp\",\"width\":1024,\"height\":1024},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/gnomeledge.com\/QH2301B\/2025\/01\/17\/hackerrank-tutorial-10-compare-the-triplets-challenge\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/gnomeledge.com\/QH2301B\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"[HackerRank] Tutorial 10:\u00a0\u201cCompare the Triplets\u201d Challenge\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/gnomeledge.com\/QH2301B\/#website\",\"url\":\"https:\/\/gnomeledge.com\/QH2301B\/\",\"name\":\"Gnome Ledge\",\"description\":\"Seekers of Knowledge\",\"publisher\":{\"@id\":\"https:\/\/gnomeledge.com\/QH2301B\/#organization\"},\"alternateName\":\"Class QH2301B\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/gnomeledge.com\/QH2301B\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/gnomeledge.com\/QH2301B\/#organization\",\"name\":\"Gnome Ledge\",\"alternateName\":\"Class QH2301B\",\"url\":\"https:\/\/gnomeledge.com\/QH2301B\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/gnomeledge.com\/QH2301B\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2023\/01\/cropped-cropped-icon_gnome_1-1.png\",\"contentUrl\":\"https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2023\/01\/cropped-cropped-icon_gnome_1-1.png\",\"width\":40,\"height\":67,\"caption\":\"Gnome Ledge\"},\"image\":{\"@id\":\"https:\/\/gnomeledge.com\/QH2301B\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/averageone.com\/\",\"https:\/\/www.linkedin.com\/in\/howeijing-wr\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/gnomeledge.com\/QH2301B\/#\/schema\/person\/6895e6c29fbf0423d8b9b25fe6ead8f5\",\"name\":\"Wei Jing HO\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/gnomeledge.com\/QH2301B\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/36cf9b99a7f988a70d4ab76145bc594be673e5f440a112c6b54f22638524203c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/36cf9b99a7f988a70d4ab76145bc594be673e5f440a112c6b54f22638524203c?s=96&d=mm&r=g\",\"caption\":\"Wei Jing HO\"},\"sameAs\":[\"https:\/\/averageone.com\/\"],\"url\":\"https:\/\/gnomeledge.com\/QH2301B\/author\/mr-ho\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"[HackerRank] Tutorial 10:\u00a0\u201cCompare the Triplets\u201d Challenge - Gnome Ledge","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/gnomeledge.com\/QH2301B\/2025\/01\/17\/hackerrank-tutorial-10-compare-the-triplets-challenge\/","og_locale":"en_US","og_type":"article","og_title":"[HackerRank] Tutorial 10:\u00a0\u201cCompare the Triplets\u201d Challenge - Gnome Ledge","og_description":"Step 1 \u2013 Launch the HackerRank Website and \u201cSign In\u201d.&nbsp;Ref:&nbsp;https:\/\/www.hackerrank.com\/ Step 2 \u2013 Click into \u201cContinue Preparation\u201d under Problem Solving. Choose \u201cCompare the Triplets\u201d Challenge. Step 3 \u2013 Read the Instructions Carefully. Change the&nbsp;Programming Language to Python 3. Step 4 \u2013 List the Requirements and Constraints in a Notepad in simple words. Learn to take [&hellip;]","og_url":"https:\/\/gnomeledge.com\/QH2301B\/2025\/01\/17\/hackerrank-tutorial-10-compare-the-triplets-challenge\/","og_site_name":"Gnome Ledge","article_published_time":"2025-01-17T06:42:53+00:00","article_modified_time":"2025-01-17T06:43:54+00:00","og_image":[{"width":1024,"height":1024,"url":"https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2025\/01\/DALL\u00b7E-2025-01-17-14.34.43-A-boy-and-a-girl-sitting-across-from-each-other-at-a-table-energetically-playing-a-game-of-scissors-paper-stone.-Both-have-playful-and-competitive-.webp","type":"image\/webp"}],"author":"Wei Jing HO","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Wei Jing HO","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/gnomeledge.com\/QH2301B\/2025\/01\/17\/hackerrank-tutorial-10-compare-the-triplets-challenge\/#article","isPartOf":{"@id":"https:\/\/gnomeledge.com\/QH2301B\/2025\/01\/17\/hackerrank-tutorial-10-compare-the-triplets-challenge\/"},"author":{"name":"Wei Jing HO","@id":"https:\/\/gnomeledge.com\/QH2301B\/#\/schema\/person\/6895e6c29fbf0423d8b9b25fe6ead8f5"},"headline":"[HackerRank] Tutorial 10:\u00a0\u201cCompare the Triplets\u201d Challenge","datePublished":"2025-01-17T06:42:53+00:00","dateModified":"2025-01-17T06:43:54+00:00","mainEntityOfPage":{"@id":"https:\/\/gnomeledge.com\/QH2301B\/2025\/01\/17\/hackerrank-tutorial-10-compare-the-triplets-challenge\/"},"wordCount":258,"commentCount":0,"publisher":{"@id":"https:\/\/gnomeledge.com\/QH2301B\/#organization"},"image":{"@id":"https:\/\/gnomeledge.com\/QH2301B\/2025\/01\/17\/hackerrank-tutorial-10-compare-the-triplets-challenge\/#primaryimage"},"thumbnailUrl":"https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2025\/01\/DALL\u00b7E-2025-01-17-14.34.43-A-boy-and-a-girl-sitting-across-from-each-other-at-a-table-energetically-playing-a-game-of-scissors-paper-stone.-Both-have-playful-and-competitive-.webp","articleSection":["Algorithms \/ Problem Solving","Ambition","Competitive Programming","HackerRank","ITE","Learning through Experimentations","Methods and Techniques","Ranking Up","Student Support","Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/gnomeledge.com\/QH2301B\/2025\/01\/17\/hackerrank-tutorial-10-compare-the-triplets-challenge\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/gnomeledge.com\/QH2301B\/2025\/01\/17\/hackerrank-tutorial-10-compare-the-triplets-challenge\/","url":"https:\/\/gnomeledge.com\/QH2301B\/2025\/01\/17\/hackerrank-tutorial-10-compare-the-triplets-challenge\/","name":"[HackerRank] Tutorial 10:\u00a0\u201cCompare the Triplets\u201d Challenge - Gnome Ledge","isPartOf":{"@id":"https:\/\/gnomeledge.com\/QH2301B\/#website"},"primaryImageOfPage":{"@id":"https:\/\/gnomeledge.com\/QH2301B\/2025\/01\/17\/hackerrank-tutorial-10-compare-the-triplets-challenge\/#primaryimage"},"image":{"@id":"https:\/\/gnomeledge.com\/QH2301B\/2025\/01\/17\/hackerrank-tutorial-10-compare-the-triplets-challenge\/#primaryimage"},"thumbnailUrl":"https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2025\/01\/DALL\u00b7E-2025-01-17-14.34.43-A-boy-and-a-girl-sitting-across-from-each-other-at-a-table-energetically-playing-a-game-of-scissors-paper-stone.-Both-have-playful-and-competitive-.webp","datePublished":"2025-01-17T06:42:53+00:00","dateModified":"2025-01-17T06:43:54+00:00","breadcrumb":{"@id":"https:\/\/gnomeledge.com\/QH2301B\/2025\/01\/17\/hackerrank-tutorial-10-compare-the-triplets-challenge\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/gnomeledge.com\/QH2301B\/2025\/01\/17\/hackerrank-tutorial-10-compare-the-triplets-challenge\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/gnomeledge.com\/QH2301B\/2025\/01\/17\/hackerrank-tutorial-10-compare-the-triplets-challenge\/#primaryimage","url":"https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2025\/01\/DALL\u00b7E-2025-01-17-14.34.43-A-boy-and-a-girl-sitting-across-from-each-other-at-a-table-energetically-playing-a-game-of-scissors-paper-stone.-Both-have-playful-and-competitive-.webp","contentUrl":"https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2025\/01\/DALL\u00b7E-2025-01-17-14.34.43-A-boy-and-a-girl-sitting-across-from-each-other-at-a-table-energetically-playing-a-game-of-scissors-paper-stone.-Both-have-playful-and-competitive-.webp","width":1024,"height":1024},{"@type":"BreadcrumbList","@id":"https:\/\/gnomeledge.com\/QH2301B\/2025\/01\/17\/hackerrank-tutorial-10-compare-the-triplets-challenge\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/gnomeledge.com\/QH2301B\/"},{"@type":"ListItem","position":2,"name":"[HackerRank] Tutorial 10:\u00a0\u201cCompare the Triplets\u201d Challenge"}]},{"@type":"WebSite","@id":"https:\/\/gnomeledge.com\/QH2301B\/#website","url":"https:\/\/gnomeledge.com\/QH2301B\/","name":"Gnome Ledge","description":"Seekers of Knowledge","publisher":{"@id":"https:\/\/gnomeledge.com\/QH2301B\/#organization"},"alternateName":"Class QH2301B","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/gnomeledge.com\/QH2301B\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/gnomeledge.com\/QH2301B\/#organization","name":"Gnome Ledge","alternateName":"Class QH2301B","url":"https:\/\/gnomeledge.com\/QH2301B\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/gnomeledge.com\/QH2301B\/#\/schema\/logo\/image\/","url":"https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2023\/01\/cropped-cropped-icon_gnome_1-1.png","contentUrl":"https:\/\/gnomeledge.com\/QH2301B\/wp-content\/uploads\/2023\/01\/cropped-cropped-icon_gnome_1-1.png","width":40,"height":67,"caption":"Gnome Ledge"},"image":{"@id":"https:\/\/gnomeledge.com\/QH2301B\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/averageone.com\/","https:\/\/www.linkedin.com\/in\/howeijing-wr\/"]},{"@type":"Person","@id":"https:\/\/gnomeledge.com\/QH2301B\/#\/schema\/person\/6895e6c29fbf0423d8b9b25fe6ead8f5","name":"Wei Jing HO","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/gnomeledge.com\/QH2301B\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/36cf9b99a7f988a70d4ab76145bc594be673e5f440a112c6b54f22638524203c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/36cf9b99a7f988a70d4ab76145bc594be673e5f440a112c6b54f22638524203c?s=96&d=mm&r=g","caption":"Wei Jing HO"},"sameAs":["https:\/\/averageone.com\/"],"url":"https:\/\/gnomeledge.com\/QH2301B\/author\/mr-ho\/"}]}},"_links":{"self":[{"href":"https:\/\/gnomeledge.com\/QH2301B\/wp-json\/wp\/v2\/posts\/3250","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gnomeledge.com\/QH2301B\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gnomeledge.com\/QH2301B\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gnomeledge.com\/QH2301B\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/gnomeledge.com\/QH2301B\/wp-json\/wp\/v2\/comments?post=3250"}],"version-history":[{"count":2,"href":"https:\/\/gnomeledge.com\/QH2301B\/wp-json\/wp\/v2\/posts\/3250\/revisions"}],"predecessor-version":[{"id":3261,"href":"https:\/\/gnomeledge.com\/QH2301B\/wp-json\/wp\/v2\/posts\/3250\/revisions\/3261"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gnomeledge.com\/QH2301B\/wp-json\/wp\/v2\/media\/3251"}],"wp:attachment":[{"href":"https:\/\/gnomeledge.com\/QH2301B\/wp-json\/wp\/v2\/media?parent=3250"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gnomeledge.com\/QH2301B\/wp-json\/wp\/v2\/categories?post=3250"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gnomeledge.com\/QH2301B\/wp-json\/wp\/v2\/tags?post=3250"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}