{"id":1079,"date":"2019-11-05T08:35:17","date_gmt":"2019-11-05T07:35:17","guid":{"rendered":"https:\/\/www.data-horizon.com\/?page_id=1079"},"modified":"2024-04-10T08:57:30","modified_gmt":"2024-04-10T06:57:30","slug":"coding-challenge-november-2019","status":"publish","type":"page","link":"https:\/\/www.data-horizon.com\/en\/coding-challenge-november-2019\/","title":{"rendered":"Coding Challenge November 2019 For Students @Chiang Mai"},"content":{"rendered":"<div class=\"wpb-content-wrapper\"><p>[vc_row css=&#8221;.vc_custom_1572951693886{padding-right: 10% !important;padding-left: 10% !important;}&#8221;][vc_column][vc_column_text]<\/p>\n<h2>Coding Challenge November 2019 For Students @Chiang Mai<\/h2>\n<p><strong>Coding Instructions:<\/strong><br \/>\nThe following German words represent a mathematical formula:<br \/>\n<strong>HIER + GIBT + ES = NEUES<\/strong><\/p>\n<p><strong>Conditions:<\/strong><br \/>\n&#8211; every letter symbolizes one digit [0..9]<br \/>\n&#8211; the 10 different letters have to be 10 different digits<br \/>\n&#8211; every word is an unsigned integer number (no leading zeros)<\/p>\n<hr \/>\n<p><strong>Example 1:<\/strong><\/p>\n<table border=\"1\" cellspacing=\"0\" cellpadding=\"6\">\n<tbody>\n<tr>\n<td>H<\/td>\n<td>I<\/td>\n<td>E<\/td>\n<td>R<\/td>\n<td>G<\/td>\n<td>B<\/td>\n<td>T<\/td>\n<td>S<\/td>\n<td>N<\/td>\n<td>U<\/td>\n<\/tr>\n<tr>\n<td>9<\/td>\n<td>8<\/td>\n<td>7<\/td>\n<td>6<\/td>\n<td>5<\/td>\n<td>4<\/td>\n<td>3<\/td>\n<td>2<\/td>\n<td>1<\/td>\n<td>0<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>HIER + GIBT + ES = NEUES<\/strong><br \/>\n9876 + 5843 + 72 = <u style=\"color: red;\">17072<\/u><br \/>\n\u274c Not correct<\/p>\n<hr \/>\n<p><strong>Example 2:<\/strong><\/p>\n<table border=\"1\" cellspacing=\"0\" cellpadding=\"6\">\n<tbody>\n<tr>\n<td>H<\/td>\n<td>I<\/td>\n<td>E<\/td>\n<td>R<\/td>\n<td>G<\/td>\n<td>B<\/td>\n<td>T<\/td>\n<td>S<\/td>\n<td>N<\/td>\n<td>U<\/td>\n<\/tr>\n<tr>\n<td>0<\/td>\n<td>1<\/td>\n<td>2<\/td>\n<td>3<\/td>\n<td>4<\/td>\n<td>5<\/td>\n<td>6<\/td>\n<td>7<\/td>\n<td>8<\/td>\n<td>9<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>HIER + GIBT + ES = NEUES<\/strong><br \/>\n<u style=\"color: red;\">0<\/u>123 + 4156 + 27 = <u style=\"color: red;\">82927<\/u><br \/>\n\u274c Not correct and must be no leading zeros<\/p>\n<hr \/>\n<p><strong>Example 3:<\/strong><\/p>\n<table border=\"1\" cellspacing=\"0\" cellpadding=\"6\">\n<tbody>\n<tr>\n<td>H<\/td>\n<td>I<\/td>\n<td>E<\/td>\n<td>R<\/td>\n<td>G<\/td>\n<td>B<\/td>\n<td>T<\/td>\n<td>S<\/td>\n<td>N<\/td>\n<td>U<\/td>\n<\/tr>\n<tr>\n<td>4<\/td>\n<td>2<\/td>\n<td>0<\/td>\n<td>1<\/td>\n<td>6<\/td>\n<td>5<\/td>\n<td>3<\/td>\n<td>8<\/td>\n<td>9<\/td>\n<td>7<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>HIER + GIBT + ES = NEUES<\/strong><br \/>\n4201 + 6253 + <u style=\"color: red;\">0<\/u>8 = <u style=\"color: red;\">90708<\/u><br \/>\n\u274c Not correct and must be no leading zeros<\/p>\n<hr \/>\n<p><strong>Challenge (Extra score):<\/strong><br \/>\n&#8211; create a PHP class containing a private method that solves the problem mentioned<br \/>\n&#8211; &#8220;worst case&#8221; solution: brute force (10<sup>10<\/sup> iterations = 10,000,000,000 iterations)<br \/>\n&#8211; &#8220;best case&#8221; solution: use mathematical rules to reduce the amount of iterations of the problem (&#8220;if then continue&#8221;)<br \/>\n&#8211; use a counter variable to measure the amount of loops needed to find possible results<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre>$iterations = 0;\r\n[loops to assign digits to the letters]\r\n\u00a0\u00a0\u00a0\u00a0e.g.: H=9;I=8;E=7;R=6;G=5;B=4;T=3;S=2;N=1;U=0\r\n\u00a0\u00a0\u00a0\u00a09876 + 5843 + 72 !== 17072  \/\/ not a correct solution\r\n\u00a0\u00a0\u00a0\u00a0$iterations++\r\n[\/loops]\r\n<\/pre>\n<p>&#8211; the method should output all results &#8211; if there are any &#8211; including the amount if iterations needed<br \/>\n&#8211; use comments to describe the mathematical rules used to reduce the complexity of the task<br \/>\n&#8211; the first place goes to the correct solution having the least iterations<\/p>\n<hr \/>\n<p><strong>Our Prizes:<\/strong><br \/>\n1<sup>st<\/sup>\u00a0Prize: Gift Voucher \u0e3f1,000.00 (Central Voucher or Major Voucher or Starbucks Voucher)<br \/>\n2<sup>nd<\/sup>\u00a0 till\u00a0 4<sup>th<\/sup> Prize: Gift Voucher \u0e3f750.00 (Central Voucher or Major Voucher or Starbucks Voucher)<br \/>\n5<sup>th<\/sup>\u00a0 till\u00a0 10<sup>th<\/sup> Prize: Starbucks Voucher \u0e3f300.00<\/p>\n<p><strong>Please send your answer and attached PHP file with a copy of your student ID and mobile phone number for reference via email to<\/strong>: <a href=\"mailto:info@data-horizon.com?subject=Coding Challenge November 2019\">info@data-horizon.com<\/a><\/p>\n<p><strong>Competition closes on the 1<sup>st<\/sup> of December 2019. The winners will be announced on 2<sup>nd<\/sup> of December 2019.<\/strong>[\/vc_column_text][\/vc_column][\/vc_row][vc_row][vc_column][\/vc_column][\/vc_row][vc_row][vc_column][\/vc_column][\/vc_row]<\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>[vc_row css=&#8221;.vc_custom_1572951693886{padding-right: 10% !important;padding-left: 10% !important;}&#8221;][vc_column][vc_column_text] Coding Challenge November 2019 For Students @Chiang Mai Coding Instructions: The following German words represent a mathematical formula: HIER + GIBT + ES = NEUES Conditions: &#8211; every letter symbolizes one digit [0..9] &#8211; the 10 different letters have to be 10 different digits &#8211; every word is an [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1148,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"page-nosidebar.php","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-1079","page","type-page","status-publish","has-post-thumbnail","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Coding Challenge November 2019 For Students @Chiang Mai<\/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:\/\/www.data-horizon.com\/en\/coding-challenge-november-2019\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Coding Challenge November 2019 For Students @Chiang Mai\" \/>\n<meta property=\"og:description\" content=\"[vc_row css=&#8221;.vc_custom_1572951693886{padding-right: 10% !important;padding-left: 10% !important;}&#8221;][vc_column][vc_column_text] Coding Challenge November 2019 For Students @Chiang Mai Coding Instructions: The following German words represent a mathematical formula: HIER + GIBT + ES = NEUES Conditions: &#8211; every letter symbolizes one digit [0..9] &#8211; the 10 different letters have to be 10 different digits &#8211; every word is an [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.data-horizon.com\/en\/coding-challenge-november-2019\/\" \/>\n<meta property=\"og:site_name\" content=\"DATA HORIZON - your web agency for digital projects!\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-10T06:57:30+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.data-horizon.com\/wp-content\/uploads\/2019\/11\/Voucher_5k.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.data-horizon.com\\\/en\\\/coding-challenge-november-2019\\\/\",\"url\":\"https:\\\/\\\/www.data-horizon.com\\\/en\\\/coding-challenge-november-2019\\\/\",\"name\":\"Coding Challenge November 2019 For Students @Chiang Mai\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.data-horizon.com\\\/en\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.data-horizon.com\\\/en\\\/coding-challenge-november-2019\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.data-horizon.com\\\/en\\\/coding-challenge-november-2019\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.data-horizon.com\\\/wp-content\\\/uploads\\\/2019\\\/11\\\/Voucher_5k.jpg\",\"datePublished\":\"2019-11-05T07:35:17+00:00\",\"dateModified\":\"2024-04-10T06:57:30+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.data-horizon.com\\\/en\\\/coding-challenge-november-2019\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.data-horizon.com\\\/en\\\/coding-challenge-november-2019\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.data-horizon.com\\\/en\\\/coding-challenge-november-2019\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.data-horizon.com\\\/wp-content\\\/uploads\\\/2019\\\/11\\\/Voucher_5k.jpg\",\"contentUrl\":\"https:\\\/\\\/www.data-horizon.com\\\/wp-content\\\/uploads\\\/2019\\\/11\\\/Voucher_5k.jpg\",\"width\":1200,\"height\":630},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.data-horizon.com\\\/en\\\/coding-challenge-november-2019\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.data-horizon.com\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Coding Challenge November 2019 For Students @Chiang Mai\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.data-horizon.com\\\/en\\\/#website\",\"url\":\"https:\\\/\\\/www.data-horizon.com\\\/en\\\/\",\"name\":\"DATA HORIZON - your web agency for digital projects!\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.data-horizon.com\\\/en\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.data-horizon.com\\\/en\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.data-horizon.com\\\/en\\\/#organization\",\"name\":\"DATA HORIZON - your web agency for digital projects!\",\"url\":\"https:\\\/\\\/www.data-horizon.com\\\/en\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.data-horizon.com\\\/en\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.data-horizon.com\\\/wp-content\\\/uploads\\\/2018\\\/10\\\/dh-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.data-horizon.com\\\/wp-content\\\/uploads\\\/2018\\\/10\\\/dh-logo.png\",\"width\":481,\"height\":170,\"caption\":\"DATA HORIZON - your web agency for digital projects!\"},\"image\":{\"@id\":\"https:\\\/\\\/www.data-horizon.com\\\/en\\\/#\\\/schema\\\/logo\\\/image\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Coding Challenge November 2019 For Students @Chiang Mai","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:\/\/www.data-horizon.com\/en\/coding-challenge-november-2019\/","og_locale":"en_US","og_type":"article","og_title":"Coding Challenge November 2019 For Students @Chiang Mai","og_description":"[vc_row css=&#8221;.vc_custom_1572951693886{padding-right: 10% !important;padding-left: 10% !important;}&#8221;][vc_column][vc_column_text] Coding Challenge November 2019 For Students @Chiang Mai Coding Instructions: The following German words represent a mathematical formula: HIER + GIBT + ES = NEUES Conditions: &#8211; every letter symbolizes one digit [0..9] &#8211; the 10 different letters have to be 10 different digits &#8211; every word is an [&hellip;]","og_url":"https:\/\/www.data-horizon.com\/en\/coding-challenge-november-2019\/","og_site_name":"DATA HORIZON - your web agency for digital projects!","article_modified_time":"2024-04-10T06:57:30+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/www.data-horizon.com\/wp-content\/uploads\/2019\/11\/Voucher_5k.jpg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.data-horizon.com\/en\/coding-challenge-november-2019\/","url":"https:\/\/www.data-horizon.com\/en\/coding-challenge-november-2019\/","name":"Coding Challenge November 2019 For Students @Chiang Mai","isPartOf":{"@id":"https:\/\/www.data-horizon.com\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.data-horizon.com\/en\/coding-challenge-november-2019\/#primaryimage"},"image":{"@id":"https:\/\/www.data-horizon.com\/en\/coding-challenge-november-2019\/#primaryimage"},"thumbnailUrl":"https:\/\/www.data-horizon.com\/wp-content\/uploads\/2019\/11\/Voucher_5k.jpg","datePublished":"2019-11-05T07:35:17+00:00","dateModified":"2024-04-10T06:57:30+00:00","breadcrumb":{"@id":"https:\/\/www.data-horizon.com\/en\/coding-challenge-november-2019\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.data-horizon.com\/en\/coding-challenge-november-2019\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.data-horizon.com\/en\/coding-challenge-november-2019\/#primaryimage","url":"https:\/\/www.data-horizon.com\/wp-content\/uploads\/2019\/11\/Voucher_5k.jpg","contentUrl":"https:\/\/www.data-horizon.com\/wp-content\/uploads\/2019\/11\/Voucher_5k.jpg","width":1200,"height":630},{"@type":"BreadcrumbList","@id":"https:\/\/www.data-horizon.com\/en\/coding-challenge-november-2019\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.data-horizon.com\/en\/"},{"@type":"ListItem","position":2,"name":"Coding Challenge November 2019 For Students @Chiang Mai"}]},{"@type":"WebSite","@id":"https:\/\/www.data-horizon.com\/en\/#website","url":"https:\/\/www.data-horizon.com\/en\/","name":"DATA HORIZON - your web agency for digital projects!","description":"","publisher":{"@id":"https:\/\/www.data-horizon.com\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.data-horizon.com\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.data-horizon.com\/en\/#organization","name":"DATA HORIZON - your web agency for digital projects!","url":"https:\/\/www.data-horizon.com\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.data-horizon.com\/en\/#\/schema\/logo\/image\/","url":"https:\/\/www.data-horizon.com\/wp-content\/uploads\/2018\/10\/dh-logo.png","contentUrl":"https:\/\/www.data-horizon.com\/wp-content\/uploads\/2018\/10\/dh-logo.png","width":481,"height":170,"caption":"DATA HORIZON - your web agency for digital projects!"},"image":{"@id":"https:\/\/www.data-horizon.com\/en\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.data-horizon.com\/en\/wp-json\/wp\/v2\/pages\/1079","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.data-horizon.com\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.data-horizon.com\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.data-horizon.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.data-horizon.com\/en\/wp-json\/wp\/v2\/comments?post=1079"}],"version-history":[{"count":4,"href":"https:\/\/www.data-horizon.com\/en\/wp-json\/wp\/v2\/pages\/1079\/revisions"}],"predecessor-version":[{"id":3481,"href":"https:\/\/www.data-horizon.com\/en\/wp-json\/wp\/v2\/pages\/1079\/revisions\/3481"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.data-horizon.com\/en\/wp-json\/wp\/v2\/media\/1148"}],"wp:attachment":[{"href":"https:\/\/www.data-horizon.com\/en\/wp-json\/wp\/v2\/media?parent=1079"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}