CINXE.COM

OpenGenus IQ: Learn Algorithms, DL, System Design

<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <title>OpenGenus IQ: Learn Algorithms, DL, System Design</title> <meta name="HandheldFriendly" content="True" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <link rel="stylesheet" type="text/css" href="/assets/built/screen.css?v=25723ea4e7" /> <!-- for progress in navigation bar --> <link rel="stylesheet" type="text/css" href="/assets/built/lightbox.css?v=25723ea4e7" /> <!-- for syntax highlight --> <link rel="stylesheet" type="text/css" href="/assets/built/prism.css?v=25723ea4e7" /> <!-- merge2.css -> complexity.css + post_page.css --> <link rel="stylesheet" type="text/css" href="/assets/built/merge2.css?v=25723ea4e7" /> <link rel="stylesheet" type="text/css" href="/assets/css/search_page.css?v=25723ea4e7" /> <style> a { text-decoration: none !important; } #time { text-align: center; font-weight: bold; } #scrollBtn { display: none; position: fixed; bottom: 90px; right: 36px; z-index: 999; border: none; outline: none; background-color: #351ed478; color: white; cursor: pointer; padding: 15px; border-radius: 50px; width: 45px; } #scrollBtn:hover { background-color: #351ed4; } @media (max-width: 480px) { #scrollBtn { right: 18px; bottom: 80px; transform: scale(0.9); } } </style> <meta name="description" content="OpenGenus IQ, an open-source Computer Science Publication House, is driven by 2500+ BSc/MSc/PhD holders globally, exploring Algorithms, Deep Learning, System Design, and more since 2017." /> <link rel="shortcut icon" href="/favicon.png" type="image/png" /> <link rel="canonical" href="https://iq.opengenus.org/" /> <meta name="referrer" content="no-referrer-when-downgrade" /> <link rel="next" href="https://iq.opengenus.org/page/2/" /> <meta property="og:site_name" content="OpenGenus IQ: Learn Algorithms, DL, System Design" /> <meta property="og:type" content="website" /> <meta property="og:title" content="OpenGenus IQ: Learn Algorithms, DL, System Design" /> <meta property="og:description" content="OpenGenus IQ, an open-source Computer Science Publication House, is driven by 2500+ BSc/MSc/PhD holders globally, exploring Algorithms, Deep Learning, System Design, and more since 2017." /> <meta property="og:url" content="https://iq.opengenus.org/" /> <meta property="article:publisher" content="https://www.facebook.com/opengenus" /> <meta name="twitter:card" content="summary" /> <meta name="twitter:title" content="OpenGenus IQ: Learn Algorithms, DL, System Design" /> <meta name="twitter:description" content="OpenGenus IQ, an open-source Computer Science Publication House, is driven by 2500+ BSc/MSc/PhD holders globally, exploring Algorithms, Deep Learning, System Design, and more since 2017." /> <meta name="twitter:url" content="https://iq.opengenus.org/" /> <meta name="twitter:site" content="@OpenGenus" /> <script type="application/ld+json"> { "@context": "https://schema.org", "@type": "WebSite", "publisher": { "@type": "Organization", "name": "OpenGenus IQ: Learn Algorithms, DL, System Design", "logo": "https://iq.opengenus.org/content/images/2018/02/ll.jpeg" }, "url": "https://iq.opengenus.org/", "mainEntityOfPage": { "@type": "WebPage", "@id": "https://iq.opengenus.org/" }, "description": "OpenGenus IQ, an open-source Computer Science Publication House, is driven by 2500+ BSc/MSc/PhD holders globally, exploring Algorithms, Deep Learning, System Design, and more since 2017." } </script> <script src="/public/ghost-sdk.min.js?v=25723ea4e7"></script> <script> ghost.init({ clientId: "ghost-frontend", clientSecret: "06875a67cb74" }); </script> <meta name="generator" content="Ghost 1.25" /> <link rel="alternate" type="application/rss+xml" title="OpenGenus IQ: Learn Algorithms, DL, System Design" href="https://iq.opengenus.org/rss/" /> <style> ins.adsbygoogle[data-ad-status="unfilled"] { display: none !important; } pre { overflow: hidden !important; word-wrap: break-word !important; word-break: break-all !important; white-space: pre; } </style> <script data-ad-client="ca-pub-6329206778297580" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-6329206778297580" crossorigin="anonymous"></script> <script async src="https://fundingchoicesmessages.google.com/i/pub-6329206778297580?ers=1" nonce="ynArYzv-IrmSxnbHoQm6Tg"></script><script nonce="ynArYzv-IrmSxnbHoQm6Tg">(function() {function signalGooglefcPresent() {if (!window.frames['googlefcPresent']) {if (document.body) {const iframe = document.createElement('iframe'); iframe.style = 'width: 0; height: 0; border: none; z-index: -1000; left: -1000px; top: -1000px;'; iframe.style.display = 'none'; iframe.name = 'googlefcPresent'; document.body.appendChild(iframe);} else {setTimeout(signalGooglefcPresent, 0);}}}signalGooglefcPresent();})();</script> <script>(function(){/* Copyright The Closure Library Authors. SPDX-License-Identifier: Apache-2.0 */ 'use strict';var aa=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}},ba="function"==typeof Object.create?Object.create:function(a){var b=function(){};b.prototype=a;return new b},k;if("function"==typeof Object.setPrototypeOf)k=Object.setPrototypeOf;else{var m;a:{var ca={a:!0},n={};try{n.__proto__=ca;m=n.a;break a}catch(a){}m=!1}k=m?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null} var p=k,q=function(a,b){a.prototype=ba(b.prototype);a.prototype.constructor=a;if(p)p(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.v=b.prototype},r=this||self,da=function(){},t=function(a){return a};var u;var w=function(a,b){this.g=b===v?a:""};w.prototype.toString=function(){return this.g+""};var v={},x=function(a){if(void 0===u){var b=null;var c=r.trustedTypes;if(c&&c.createPolicy){try{b=c.createPolicy("goog#html",{createHTML:t,createScript:t,createScriptURL:t})}catch(d){r.console&&r.console.error(d.message)}u=b}else u=b}a=(b=u)?b.createScriptURL(a):a;return new w(a,v)};var A=function(){return Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)};var B={},C=null;var D="function"===typeof Uint8Array;function E(a,b,c){return"object"===typeof a?D&&!Array.isArray(a)&&a instanceof Uint8Array?c(a):F(a,b,c):b(a)}function F(a,b,c){if(Array.isArray(a)){for(var d=Array(a.length),e=0;e<a.length;e++){var f=a[e];null!=f&&(d[e]=E(f,b,c))}Array.isArray(a)&&a.s&&G(d);return d}d={};for(e in a)Object.prototype.hasOwnProperty.call(a,e)&&(f=a[e],null!=f&&(d[e]=E(f,b,c)));return d} function ea(a){return F(a,function(b){return"number"===typeof b?isFinite(b)?b:String(b):b},function(b){var c;void 0===c&&(c=0);if(!C){C={};for(var d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),e=["+/=","+/","-_=","-_.","-_"],f=0;5>f;f++){var h=d.concat(e[f].split(""));B[f]=h;for(var g=0;g<h.length;g++){var l=h[g];void 0===C[l]&&(C[l]=g)}}}c=B[c];d=Array(Math.floor(b.length/3));e=c[64]||"";for(f=h=0;h<b.length-2;h+=3){var y=b[h],z=b[h+1];l=b[h+2];g=c[y>>2];y=c[(y&3)<< 4|z>>4];z=c[(z&15)<<2|l>>6];l=c[l&63];d[f++]=""+g+y+z+l}g=0;l=e;switch(b.length-h){case 2:g=b[h+1],l=c[(g&15)<<2]||e;case 1:b=b[h],d[f]=""+c[b>>2]+c[(b&3)<<4|g>>4]+l+e}return d.join("")})}var fa={s:{value:!0,configurable:!0}},G=function(a){Array.isArray(a)&&!Object.isFrozen(a)&&Object.defineProperties(a,fa);return a};var H;var J=function(a,b,c){var d=H;H=null;a||(a=d);d=this.constructor.u;a||(a=d?[d]:[]);this.j=d?0:-1;this.h=null;this.g=a;a:{d=this.g.length;a=d-1;if(d&&(d=this.g[a],!(null===d||"object"!=typeof d||Array.isArray(d)||D&&d instanceof Uint8Array))){this.l=a-this.j;this.i=d;break a}void 0!==b&&-1<b?(this.l=Math.max(b,a+1-this.j),this.i=null):this.l=Number.MAX_VALUE}if(c)for(b=0;b<c.length;b++)a=c[b],a<this.l?(a+=this.j,(d=this.g[a])?G(d):this.g[a]=I):(d=this.l+this.j,this.g[d]||(this.i=this.g[d]={}),(d=this.i[a])? G(d):this.i[a]=I)},I=Object.freeze(G([])),K=function(a,b){if(-1===b)return null;if(b<a.l){b+=a.j;var c=a.g[b];return c!==I?c:a.g[b]=G([])}if(a.i)return c=a.i[b],c!==I?c:a.i[b]=G([])},M=function(a,b){var c=L;if(-1===b)return null;a.h||(a.h={});if(!a.h[b]){var d=K(a,b);d&&(a.h[b]=new c(d))}return a.h[b]};J.prototype.toJSON=function(){var a=N(this,!1);return ea(a)}; var N=function(a,b){if(a.h)for(var c in a.h)if(Object.prototype.hasOwnProperty.call(a.h,c)){var d=a.h[c];if(Array.isArray(d))for(var e=0;e<d.length;e++)d[e]&&N(d[e],b);else d&&N(d,b)}return a.g},O=function(a,b){H=b=b?JSON.parse(b):null;a=new a(b);H=null;return a};J.prototype.toString=function(){return N(this,!1).toString()};var P=function(a){J.call(this,a)};q(P,J);function ha(a){var b,c=(a.ownerDocument&&a.ownerDocument.defaultView||window).document,d=null===(b=c.querySelector)||void 0===b?void 0:b.call(c,"script[nonce]");(b=d?d.nonce||d.getAttribute("nonce")||"":"")&&a.setAttribute("nonce",b)};var Q=function(a,b){b=String(b);"application/xhtml+xml"===a.contentType&&(b=b.toLowerCase());return a.createElement(b)},R=function(a){this.g=a||r.document||document};R.prototype.appendChild=function(a,b){a.appendChild(b)};var S=function(a,b,c,d,e,f){try{var h=a.g,g=Q(a.g,"SCRIPT");g.async=!0;g.src=b instanceof w&&b.constructor===w?b.g:"type_error:TrustedResourceUrl";ha(g);h.head.appendChild(g);g.addEventListener("load",function(){e();d&&h.head.removeChild(g)});g.addEventListener("error",function(){0<c?S(a,b,c-1,d,e,f):(d&&h.head.removeChild(g),f())})}catch(l){f()}};var ia=r.atob("aHR0cHM6Ly93d3cuZ3N0YXRpYy5jb20vaW1hZ2VzL2ljb25zL21hdGVyaWFsL3N5c3RlbS8xeC93YXJuaW5nX2FtYmVyXzI0ZHAucG5n"),ja=r.atob("WW91IGFyZSBzZWVpbmcgdGhpcyBtZXNzYWdlIGJlY2F1c2UgYWQgb3Igc2NyaXB0IGJsb2NraW5nIHNvZnR3YXJlIGlzIGludGVyZmVyaW5nIHdpdGggdGhpcyBwYWdlLg=="),ka=r.atob("RGlzYWJsZSBhbnkgYWQgb3Igc2NyaXB0IGJsb2NraW5nIHNvZnR3YXJlLCB0aGVuIHJlbG9hZCB0aGlzIHBhZ2Uu"),la=function(a,b,c){this.h=a;this.j=new R(this.h);this.g=null;this.i=[];this.l=!1;this.o=b;this.m=c},V=function(a){if(a.h.body&&!a.l){var b= function(){T(a);r.setTimeout(function(){return U(a,3)},50)};S(a.j,a.o,2,!0,function(){r[a.m]||b()},b);a.l=!0}},T=function(a){for(var b=W(1,5),c=0;c<b;c++){var d=X(a);a.h.body.appendChild(d);a.i.push(d)}b=X(a);b.style.bottom="0";b.style.left="0";b.style.position="fixed";b.style.width=W(100,110).toString()+"%";b.style.zIndex=W(2147483544,2147483644).toString();b.style["background-color"]=ma(249,259,242,252,219,229);b.style["box-shadow"]="0 0 12px #888";b.style.color=ma(0,10,0,10,0,10);b.style.display= "flex";b.style["justify-content"]="center";b.style["font-family"]="Roboto, Arial";c=X(a);c.style.width=W(80,85).toString()+"%";c.style.maxWidth=W(750,775).toString()+"px";c.style.margin="24px";c.style.display="flex";c.style["align-items"]="flex-start";c.style["justify-content"]="center";d=Q(a.j.g,"IMG");d.className=A();d.src=ia;d.style.height="24px";d.style.width="24px";d.style["padding-right"]="16px";var e=X(a),f=X(a);f.style["font-weight"]="bold";f.textContent=ja;var h=X(a);h.textContent=ka;Y(a, e,f);Y(a,e,h);Y(a,c,d);Y(a,c,e);Y(a,b,c);a.g=b;a.h.body.appendChild(a.g);b=W(1,5);for(c=0;c<b;c++)d=X(a),a.h.body.appendChild(d),a.i.push(d)},Y=function(a,b,c){for(var d=W(1,5),e=0;e<d;e++){var f=X(a);b.appendChild(f)}b.appendChild(c);c=W(1,5);for(d=0;d<c;d++)e=X(a),b.appendChild(e)},W=function(a,b){return Math.floor(a+Math.random()*(b-a))},ma=function(a,b,c,d,e,f){return"rgb("+W(Math.max(a,0),Math.min(b,255)).toString()+","+W(Math.max(c,0),Math.min(d,255)).toString()+","+W(Math.max(e,0),Math.min(f, 255)).toString()+")"},X=function(a){a=Q(a.j.g,"DIV");a.className=A();return a},U=function(a,b){0>=b||null!=a.g&&0!=a.g.offsetHeight&&0!=a.g.offsetWidth||(na(a),T(a),r.setTimeout(function(){return U(a,b-1)},50))},na=function(a){var b=a.i;var c="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];b=c?c.call(b):{next:aa(b)};for(c=b.next();!c.done;c=b.next())(c=c.value)&&c.parentNode&&c.parentNode.removeChild(c);a.i=[];(b=a.g)&&b.parentNode&&b.parentNode.removeChild(b);a.g=null};var pa=function(a,b,c,d,e){var f=oa(c),h=function(l){l.appendChild(f);r.setTimeout(function(){f?(0!==f.offsetHeight&&0!==f.offsetWidth?b():a(),f.parentNode&&f.parentNode.removeChild(f)):a()},d)},g=function(l){document.body?h(document.body):0<l?r.setTimeout(function(){g(l-1)},e):b()};g(3)},oa=function(a){var b=document.createElement("div");b.className=a;b.style.width="1px";b.style.height="1px";b.style.position="absolute";b.style.left="-10000px";b.style.top="-10000px";b.style.zIndex="-10000";return b};var L=function(a){J.call(this,a)};q(L,J);var qa=function(a){J.call(this,a)};q(qa,J);var ra=function(a,b){this.l=a;this.m=new R(a.document);this.g=b;this.i=K(this.g,1);b=M(this.g,2);this.o=x(K(b,4)||"");this.h=!1;b=M(this.g,13);b=x(K(b,4)||"");this.j=new la(a.document,b,K(this.g,12))};ra.prototype.start=function(){sa(this)}; var sa=function(a){ta(a);S(a.m,a.o,3,!1,function(){a:{var b=a.i;var c=r.btoa(b);if(c=r[c]){try{var d=O(P,r.atob(c))}catch(e){b=!1;break a}b=b===K(d,1)}else b=!1}b?Z(a,K(a.g,14)):(Z(a,K(a.g,8)),V(a.j))},function(){pa(function(){Z(a,K(a.g,7));V(a.j)},function(){return Z(a,K(a.g,6))},K(a.g,9),K(a.g,10),K(a.g,11))})},Z=function(a,b){a.h||(a.h=!0,a=new a.l.XMLHttpRequest,a.open("GET",b,!0),a.send())},ta=function(a){var b=r.btoa(a.i);a.l[b]&&Z(a,K(a.g,5))};(function(a,b){r[a]=function(c){for(var d=[],e=0;e<arguments.length;++e)d[e-0]=arguments[e];r[a]=da;b.apply(null,d)}})("__h82AlnkH6D91__",function(a){"function"===typeof window.atob&&(new ra(window,O(qa,window.atob(a)))).start()});}).call(this); window.__h82AlnkH6D91__("WyJwdWItNjMyOTIwNjc3ODI5NzU4MCIsW251bGwsbnVsbCxudWxsLCJodHRwczovL2Z1bmRpbmdjaG9pY2VzbWVzc2FnZXMuZ29vZ2xlLmNvbS9iL3B1Yi02MzI5MjA2Nzc4Mjk3NTgwIl0sbnVsbCxudWxsLCJodHRwczovL2Z1bmRpbmdjaG9pY2VzbWVzc2FnZXMuZ29vZ2xlLmNvbS9lbC9BR1NLV3hVd0w5V1hBMkN4TlFNVldpbU1UZFpIclUzM3ZRTUxfMk9QeTYzQmc0RVhUOVN3Nloxd0UzcWVtOVFOR3FsSUJtNlNIMi1CQnQ4R3BZdHR3cGRBVnhjWm13XHUwMDNkXHUwMDNkP3RlXHUwMDNkVE9LRU5fRVhQT1NFRCIsImh0dHBzOi8vZnVuZGluZ2Nob2ljZXNtZXNzYWdlcy5nb29nbGUuY29tL2VsL0FHU0tXeFVNWXI3cm10bUhUZm1IRUlpV1hjMzdranAyR3JSaDNiMnk4bEQ3YmF3S3h5RnNod2p0T0tfVmE0SEhBTjl2QVdjQ0Npc3dkT3VENGZ4WHdMQ0NlMVFVaUFcdTAwM2RcdTAwM2Q/YWJcdTAwM2QxXHUwMDI2c2JmXHUwMDNkMSIsImh0dHBzOi8vZnVuZGluZ2Nob2ljZXNtZXNzYWdlcy5nb29nbGUuY29tL2VsL0FHU0tXeFgxcUhHdjNkZGk3R0N3b0NlbmV4bi1VellVZWtlamNJbTA3UEZQUW1hdU9jU1A1cU9QUnM2WjFEUGFuRHFGcTVyNUN1Ymt1WG91NnFVMFlyTnlhLTJHU3dcdTAwM2RcdTAwM2Q/YWJcdTAwM2QyXHUwMDI2c2JmXHUwMDNkMSIsImh0dHBzOi8vZnVuZGluZ2Nob2ljZXNtZXNzYWdlcy5nb29nbGUuY29tL2VsL0FHU0tXeFZFaEo2QUlKMmZoWDZjdnRzTFRmRy02R2NxVE5MODBJYzBhZnA4eDh0aGRJcUZ3SW9iZThtRDNCOXpmUEhEcDNEQVZxeDdXaXM2eFN6T0FUSG9jNzg0SmdcdTAwM2RcdTAwM2Q/c2JmXHUwMDNkMiIsImRpdi1ncHQtYWQiLDIwLDEwMCwiY0hWaUxUWXpNamt5TURZM056Z3lPVGMxT0RBXHUwMDNkIixbbnVsbCxudWxsLG51bGwsImh0dHBzOi8vd3d3LmdzdGF0aWMuY29tLzBlbW4vZi9wL3B1Yi02MzI5MjA2Nzc4Mjk3NTgwLmpzP3VzcXBcdTAwM2RDQkEiXSwiaHR0cHM6Ly9mdW5kaW5nY2hvaWNlc21lc3NhZ2VzLmdvb2dsZS5jb20vZWwvQUdTS1d4Vk5vOXFjbFRmc2taemJmR3FtMWVRSmVoWm1zSzk4YjNwR1ZxRlhLdm9DZnFFTEk0U2hKMVM2cWFlQTJBaVgzQlVwMjVnTXZpMnZmS1NjcjZOVjd3VlMwQVx1MDAzZFx1MDAzZCJd");</script> <script type="application/ld+json"> { "@context": "https://schema.org", "@type": "WebSite", "url": "https://iq.opengenus.org/", "potentialAction": { "@type": "SearchAction", "target": { "@type": "EntryPoint", "urlTemplate": "https://iq.opengenus.org/search/?q={search_term_string}" }, "query-input": "required name=search_term_string" } } </script> </head> <div id="nav_toggle" class="navbar_collapse navigation_page"> <div id="navbar_close">&times</div> <a href="http://iq.opengenus.org">Home</a> <a href="http://discourse.opengenus.org">Discussions</a> <a href="http://iq.opengenus.org/guide-to-writing-a-note-at-opengenus-iq/">Write at Opengenus IQ</a> </div> <body class="home-template"> <div id="search_page" class="search_page search_page_hide"> <div class="search_page_close search_toggle">&times</div> <div class="search_page_body"> <div id="site-search" style="display:none;" class="search_form"> <input class="typeahead search_form_input" type="text" placeholder="Search" /> </div> </div> </div> <div class="site-wrapper"> <style> .w3-modal { padding-top: 100px; position: fixed; display: none; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.4); } .w3-modal-content { margin: auto; background-color: #fff; position: relative; width: 80%; } .w3-container{ padding: 0.01em 16px; } .w3-button { position: absolute; right: 0; padding-right: 2.5%; top: 0; background: rgb(255, 255, 255); padding-top: 2.5%; } @media screen and (min-width: 600px) { .w3-modal-content { width: 70%; } @media screen and (min-width: 800px) { .w3-modal-content { width: 60%; } } .gssb_c .gsc-completion-container{ position: fixed; width: fit-content !important; } </style> <!-- <script async src="https://cse.google.com/cse.js?cx=a08efacafd37fe86c"></script> --> <div id="id01" class="w3-modal" style="z-index: 500; max-width: 0em 3em;"> <div class="w3-modal-content"> <div class="w3-container"> <button onclick="document.getElementById('id01').style.display='none'" class="w3-button">&times;</button> <br> <p style="font-size:1.5vw;">Search anything:</p> <div class="gcse-search"></div> </div> </div> </div> <script> function openmodal() { document.getElementById('id01').style.display='block'; document.getElementById("gsc-i-id1").focus(); } </script> <style> .searchbar { width: 360px; height: 56px; left: 461px; top: 399px; margin-bottom: 1em; } .searchbartext { width: 360px; height: 56px; left: 461px; top: 399px; border: none; font-family: Noto Sans HK; font-style: normal; font-weight: normal; font-size: 22px; line-height: 20px; padding-left: 5%; color: #ffffff; background: rgba(255, 255, 255, 0.4); box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25); border-radius: 100px; } input:active { border: none; } .gsc-control-cse { background-color: #F4F8FB; border: 1px solid #F4F8FB; } ::placeholder{ color: #ffffff; } .btn-default{ position: absolute; width: 24.62px; height: 36.85px; margin-left: -2em; margin-top: 0.5em; background: transparent; } @media screen and (max-width: 417px){ .btn-default{ margin-left: -14%; margin-right: 0%; } .searchbartext { margin-left: 2.5%; margin-right: 2.5%; width: 80%; } </style> <!-- SEARCH BAR --> <header class="site-header outer no-cover"> <div class="inner"> <nav class="navbar"> <div class="burger_menu"> <label for="burgertoggle" >&#9776;</label> <input type="checkbox" id="burgertoggle"/> </div> <div class="navbar-left"> <ul class="nav" role="menu"> <li class="nav-dsa-cheatsheet" role="menuitem"><a href="https://amzn.to/4arEtct">DSA Cheatsheet</a></li> <li class="nav-home nav-current" role="menuitem"><a href="https://iq.opengenus.org/">HOME</a></li> <li class="nav-track-your-progress" role="menuitem"><a href="https://iq.opengenus.org/100-interview-problems/">Track your progress</a></li> <li class="nav-deep-learning-free" role="menuitem"><a href="https://iq.opengenus.org/deep-learning-checklist/">Deep Learning (FREE)</a></li> <li class="nav-join-our-internship-" role="menuitem"><a href="https://discourse.opengenus.org/t/internship-guidelines-at-opengenus/2335/">Join our Internship 🎓</a></li> <li class="nav-random" role="menuitem"><a href="https://iq.opengenus.org/random/">RANDOM</a></li> <li class="nav-one-liner" role="menuitem"><a href="https://iq.opengenus.org/one/">One Liner</a></li> </ul> </div> <div class="navbar-right"> <a class="search_button"> <i class="fa fa-search search_toggle" style="cursor:pointer;"></i> </a> <a class="rss-button" href="https://feedly.com/i/subscription/feed/https://iq.opengenus.org/rss/" target="_blank" rel="noopener"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><circle cx="6.18" cy="17.82" r="2.18"/><path d="M4 4.44v2.83c7.03 0 12.73 5.7 12.73 12.73h2.83c0-8.59-6.97-15.56-15.56-15.56zm0 5.66v2.83c3.9 0 7.07 3.17 7.07 7.07h2.83c0-5.47-4.43-9.9-9.9-9.9z"/></svg> </a> </div> </nav> <div class="site-header-content"> <!-- <h1 class="site-title"> <img loading="lazy" class="site-logo" src="/content/images/2018/02/ll.jpeg" alt="OpenGenus IQ: Learn Algorithms, DL, System Design" /> </h1> --> <img loading="lazy" class="header_image" src="/assets/images/Logo.svg?v=25723ea4e7"> <!-- <h1 style="color:white !important"> OpenGenus IQ </h1> --> <p style="color:white !important" class="site-slogan">OpenGenus IQ, an open-source Computer Science Publication House, is driven by 2500+ BSc/MSc/PhD holders globally, exploring Algorithms, Deep Learning, System Design, and more since 2017.</p> <!-- SEARCH BAR OPENGENUS IQ --> <center> <form class="searchbar" role="search" method="get"> <input autocomplete="off" name="q" placeholder="Search anything ..." title="search here" type="text" id="name" onclick="document.getElementById('id01').style.display='block'" class="searchbartext" /> <button type="submit" disabled class="btn btn-default"> &#x1F50D; </button> </form> </center> <!-- <script async src="https://cse.google.com/cse.js?cx=partner-pub-6329206778297580:rcr8n5lvcxq"></script> --> <!-- SEARCH BAR DONE --> </div> </div> </header> <button id="scrollBtn" class="fa fa-angle-up" title="Go to top"></button> <main id="site-main" class="site-main outer" role="main"> <div class="inner"> <div class="post-feed"> <ins class="adsbygoogle" style="display:block" data-ad-format="fluid" data-ad-layout-key="-59+bd-2y-23+109" data-ad-client="ca-pub-6329206778297580" data-ad-slot="9783126023"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> <article class="post-card post tag-books tag-cpp no-image"> <div class="post-card-content"> <a class="post-card-content-link" href="/cpp-cheatsheet-goat/"> <header class="post-card-header"> <span class="post-card-tags">books</span> <h2 class="post_card_title">C++ Coding Cheatsheet: GOAT edition</h2> </header> <section class="post_card_excerpt"> <p>The book "C++: Coding Cheatsheet: GOAT edition" is the only book you need to master C++ programming concepts. The focus is on practical programming skills, design concepts and performance engineering ideas.</p> </section> </a> <footer class="post-card-meta"> <span class="post-card-author"><a href="/author/jey/">Jey Son Chuah</a></span> </footer> </div> </article> <article class="post-card post tag-deep-learning tag-books no-image"> <div class="post-card-content"> <a class="post-card-content-link" href="/dl1943-cheatsheet/"> <header class="post-card-header"> <span class="post-card-tags">Deep Learning</span> <h2 class="post_card_title">DL1943 Deep Learning Cheatsheet</h2> </header> <section class="post_card_excerpt"> <p>The book "Deep Learning: DL1943 Cheatsheet: DL/AI/ML Research, Engineering, Optimization & System Design" is the only book you need to master Deep Learning (DL) concepts.</p> </section> </a> <footer class="post-card-meta"> <img loading="lazy" class="author-profile-image" src="/content/images/2020/04/ue-kiao.jpg" alt="Ue Kiao, PhD" /> <span class="post-card-author"><a href="/author/ue/">Ue Kiao, PhD</a></span> </footer> </div> </article> <article class="post-card post featured no-image"> <div class="post-card-content"> <a class="post-card-content-link" href="/multi-agent-cps/"> <header class="post-card-header"> <h2 class="post_card_title">Multi-Agent Cyber-Physical Systems</h2> </header> <section class="post_card_excerpt"> <p>So far we've been only talking about single-agent systems. However, as we attempt to model complex systems in the real world, we shall soon find that in most cases a single agent will not suffice.</p> </section> </a> <footer class="post-card-meta"> <span class="post-card-author"><a href="/author/sarthak-das/">Sarthak Das</a></span> </footer> </div> </article> <article class="post-card post tag-go"> <a class="post-card-image-link" href="/concurrency-in-go-once-again/"> <div class="post-card-image" style="background-image: url(/content/images/2024/08/cold--smooth---tasty..png)"></div> </a> <div class="post-card-content"> <a class="post-card-content-link" href="/concurrency-in-go-once-again/"> <header class="post-card-header"> <span class="post-card-tags">Go Programming Language</span> <h2 class="post_card_title">Introduction to Concurrency in Go</h2> </header> <section class="post_card_excerpt"> <p>A goroutine is a function that runs concurrently to other functions. Channels provide a medium for goroutines to communicate with each other.</p> </section> </a> <footer class="post-card-meta"> <img loading="lazy" class="author-profile-image" src="/content/images/2023/12/hamza.jpg" alt="Hamza Mateen" /> <span class="post-card-author"><a href="/author/hamza/">Hamza Mateen</a></span> </footer> </div> </article> <article class="post-card post tag-pytorch tag-python tag-deep-learning no-image"> <div class="post-card-content"> <a class="post-card-content-link" href="/torch-tensor-max-and-torch-max-in-pytorch/"> <header class="post-card-header"> <span class="post-card-tags">PyTorch</span> <h2 class="post_card_title">Understanding the differences and use Cases of torch.Tensor.max and torch.max in PyTorch</h2> </header> <section class="post_card_excerpt"> <p>torch.Tensor.max is an instance method that applies directly to a torch.Tensor object and is mainly used to find maximum values within a single tensor. torch.max is a module-level function used to compare two tensors element-wise.</p> </section> </a> <footer class="post-card-meta"> <span class="post-card-author"><a href="/author/godwin/">Godwin AMEGAH</a></span> </footer> </div> </article> <article class="post-card post no-image"> <div class="post-card-content"> <a class="post-card-content-link" href="/introduction-to-cyber-physical-systems/"> <header class="post-card-header"> <h2 class="post_card_title">An Introduction to Cyber-Physical Systems</h2> </header> <section class="post_card_excerpt"> <p>Put in simple terms, a cyber-physical system (CPS), as the name suggests, is a dynamical system that exhibits both discrete (cyber) and continuous (physical) dynamic behavior.</p> </section> </a> <footer class="post-card-meta"> <span class="post-card-author"><a href="/author/sarthak-das/">Sarthak Das</a></span> </footer> </div> </article> <article class="post-card post tag-linux tag-software-engineering no-image"> <div class="post-card-content"> <a class="post-card-content-link" href="/linux-namespaces/"> <header class="post-card-header"> <span class="post-card-tags">Linux</span> <h2 class="post_card_title">Understanding Linux Namespaces: The Building Blocks of Containerization</h2> </header> <section class="post_card_excerpt"> <p>Containerization uses specific features of the Linux kernel to create isolated environments for running applications.</p> </section> </a> <footer class="post-card-meta"> <span class="post-card-author"><a href="/author/shruti-2/">Shruti</a></span> </footer> </div> </article> <article class="post-card post tag-cyber-security tag-software-engineering no-image"> <div class="post-card-content"> <a class="post-card-content-link" href="/goals-of-network-security/"> <header class="post-card-header"> <span class="post-card-tags">cyber security</span> <h2 class="post_card_title">Goals of Network Security</h2> </header> <section class="post_card_excerpt"> <p>Network security is a critical aspect of modern computer networks, ensuring the protection of data, systems, and resources from unauthorized access, damage, or disruption.</p> </section> </a> <footer class="post-card-meta"> <img loading="lazy" class="author-profile-image" src="/content/images/2023/12/logo.jpg" alt="Kazi Priom" /> <span class="post-card-author"><a href="/author/kp/">Kazi Priom</a></span> </footer> </div> </article> <article class="post-card post tag-java tag-software-engineering no-image"> <div class="post-card-content"> <a class="post-card-content-link" href="/oop-in-java-contact-book-program/"> <header class="post-card-header"> <span class="post-card-tags">Java</span> <h2 class="post_card_title">Basics of OOP in Java: Contact Book Program</h2> </header> <section class="post_card_excerpt"> <p>In this OpenGenus article, you will learn how to apply the basic concepts of object-oriented programming (OOP) to develop a simple, console-based contact book application.</p> </section> </a> <footer class="post-card-meta"> <span class="post-card-author"><a href="/author/scott/">Scott Chen</a></span> </footer> </div> </article> <article class="post-card post no-image"> <div class="post-card-content"> <a class="post-card-content-link" href="/exploring-randomness-and-statistical-simulations-in-online-games/"> <header class="post-card-header"> <h2 class="post_card_title">Exploring Randomness and Statistical Simulations in Online Games</h2> </header> <section class="post_card_excerpt"> <p>The ever-changing online gaming world is built with randomness as an integral part. Randomness is needed because it gives variety and fun purely from the unpredictability of the fate of the characters' abilities.</p> </section> </a> <footer class="post-card-meta"> <span class="post-card-author"><a href="/author/badal/">Badal Srivastava</a></span> </footer> </div> </article> <article class="post-card post tag-python no-image"> <div class="post-card-content"> <a class="post-card-content-link" href="/dodgeball-game-in-pygame/"> <header class="post-card-header"> <span class="post-card-tags">Python</span> <h2 class="post_card_title">Dodgeball game in PyGame [with source code]</h2> </header> <section class="post_card_excerpt"> <p>In this OpenGenus article, let us create a Dodgeball game in Python. You can customize your game along the way without having to stick to my design choices.</p> </section> </a> <footer class="post-card-meta"> <span class="post-card-author"><a href="/author/sridevi/">Sridevi Shankar</a></span> </footer> </div> </article> <article class="post-card post tag-machine-learning no-image"> <div class="post-card-content"> <a class="post-card-content-link" href="/active-learning-how-machines-learn-better-with-human-guidance/"> <header class="post-card-header"> <span class="post-card-tags">Machine Learning (ML)</span> <h2 class="post_card_title">Active Learning: How Machines Learn Better with Human Guidance</h2> </header> <section class="post_card_excerpt"> <p>Active learning solves this problem by letting the model query a human expert for labels on the most uncertain or informative data points.</p> </section> </a> <footer class="post-card-meta"> <span class="post-card-author"><a href="/author/nicholas/">Nicholas Adenmosun</a></span> </footer> </div> </article> <article class="post-card post tag-deep-learning no-image"> <div class="post-card-content"> <a class="post-card-content-link" href="/retrieval-augmented-generation/"> <header class="post-card-header"> <span class="post-card-tags">Deep Learning</span> <h2 class="post_card_title">Retrieval Augmented Generation (Concepts)</h2> </header> <section class="post_card_excerpt"> <p>The RAG concept was first introduced in the paper "Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks" by Patrick Lewis and team at Facebook AI Research, which caught the attention of AI developers and industrial scientists.</p> </section> </a> <footer class="post-card-meta"> <span class="post-card-author"><a href="/author/godwin/">Godwin AMEGAH</a></span> </footer> </div> </article> <article class="post-card post tag-deep-learning no-image"> <div class="post-card-content"> <a class="post-card-content-link" href="/bilinear-upsampling/"> <header class="post-card-header"> <span class="post-card-tags">Deep Learning</span> <h2 class="post_card_title">Bilinear Upsampling</h2> </header> <section class="post_card_excerpt"> <p>In this OpenGenus article, let us discuss Bilinear Upsampling which pops up quite bit in regards to image manipulation and processing in a greater detail.</p> </section> </a> <footer class="post-card-meta"> <span class="post-card-author"><a href="/author/shivangi-chatterjee/">Shivangi Chatterjee</a></span> </footer> </div> </article> <article class="post-card post tag-hashing tag-software-engineering tag-algorithm no-image"> <div class="post-card-content"> <a class="post-card-content-link" href="/chameleon-hash/"> <header class="post-card-header"> <span class="post-card-tags">Hashing</span> <h2 class="post_card_title">Chameleon Hash: Balancing Security and Flexibility in Cryptographic Hashing</h2> </header> <section class="post_card_excerpt"> <p>In this OpenGenus article, we examine the key properties of Chameleon hash functions, their construction, and their potential applications, and provides an overview of their advantages and limitations in modern cryptographic systems.</p> </section> </a> <footer class="post-card-meta"> <span class="post-card-author"><a href="/author/arpish/">Arpish R. Solanki</a></span> </footer> </div> </article> <article class="post-card post tag-computer-architecture no-image"> <div class="post-card-content"> <a class="post-card-content-link" href="/physical-and-architectural-constraints-in-cpus-and-gpus/"> <header class="post-card-header"> <span class="post-card-tags">Computer Architecture</span> <h2 class="post_card_title">Physical and Architectural Constraints in CPUs and GPUs</h2> </header> <section class="post_card_excerpt"> <p>Central processing units (CPUs) and graphics processing units (GPUs) are fundamental components of modern computer systems, each fulfilling different but complementary roles.</p> </section> </a> <footer class="post-card-meta"> <span class="post-card-author"><a href="/author/arpish/">Arpish R. Solanki</a></span> </footer> </div> </article> <article class="post-card post tag-pytorch tag-deep-learning no-image"> <div class="post-card-content"> <a class="post-card-content-link" href="/slice_scatter-op-in-pytorch/"> <header class="post-card-header"> <span class="post-card-tags">PyTorch</span> <h2 class="post_card_title">slice_scatter op in PyTorch</h2> </header> <section class="post_card_excerpt"> <p>`torch.slice_scatter` is a tensor manipulation function in PyTorch that allows us to embed values from one tensor into another at specified locations. This operation generates a new tensor with fresh storage rather than modifying the original tensor.</p> </section> </a> <footer class="post-card-meta"> <span class="post-card-author"><a href="/author/vedashree/">Vedashree D</a></span> </footer> </div> </article> <article class="post-card post tag-pytorch tag-deep-learning no-image"> <div class="post-card-content"> <a class="post-card-content-link" href="/designing-resnet50-in-pytorch/"> <header class="post-card-header"> <span class="post-card-tags">PyTorch</span> <h2 class="post_card_title">Designing ResNet50 in PyTorch</h2> </header> <section class="post_card_excerpt"> <p>The core architectural innovation is the use of residual blocks with shortcut connections (or skip connections).</p> </section> </a> <footer class="post-card-meta"> <span class="post-card-author"><a href="/author/vedashree/">Vedashree D</a></span> </footer> </div> </article> <article class="post-card post tag-software-engineering no-image"> <div class="post-card-content"> <a class="post-card-content-link" href="/td-files-tablegen/"> <header class="post-card-header"> <span class="post-card-tags">Software Engineering</span> <h2 class="post_card_title">Unleashing the Power of .td Files: TableGen</h2> </header> <section class="post_card_excerpt"> <p>In this OpenGenus article, we cover some of the basic concepts of .td files and the functionalities and components of TableGen and its importance in the LLVM project. We will also review several use cases and benefits of using TableGen for code generation and optimization.</p> </section> </a> <footer class="post-card-meta"> <span class="post-card-author"><a href="/author/md-soyeb/">Md. Soyeb</a></span> </footer> </div> </article> <article class="post-card post tag-software-engineering no-image"> <div class="post-card-content"> <a class="post-card-content-link" href="/beginners-guide-to-kubernetes/"> <header class="post-card-header"> <span class="post-card-tags">Software Engineering</span> <h2 class="post_card_title">A Beginner&#x27;s Guide to Kubernetes</h2> </header> <section class="post_card_excerpt"> <p>In this OpenGenus article, we have explored the topic Kubernetes from scratch with real life example.</p> </section> </a> <footer class="post-card-meta"> <img loading="lazy" class="author-profile-image" src="/content/images/2022/10/shivani.jpeg" alt="Shivani Kumari" /> <span class="post-card-author"><a href="/author/shivani-kumari/">Shivani Kumari</a></span> </footer> </div> </article> <article class="post-card post tag-software-engineering tag-java no-image"> <div class="post-card-content"> <a class="post-card-content-link" href="/flyweight-pattern/"> <header class="post-card-header"> <span class="post-card-tags">Software Engineering</span> <h2 class="post_card_title">Light as a Feather: The Art of the Flyweight Pattern</h2> </header> <section class="post_card_excerpt"> <p>In this OpenGenus article, we'll unravel the nuts and bolts of the Flyweight Pattern, exploring how it reduces memory footprint while optimizing performance.</p> </section> </a> <footer class="post-card-meta"> <span class="post-card-author"><a href="/author/md-soyeb/">Md. Soyeb</a></span> </footer> </div> </article> <article class="post-card post tag-deep-learning no-image"> <div class="post-card-content"> <a class="post-card-content-link" href="/kolmogorov-arnold-networks/"> <header class="post-card-header"> <span class="post-card-tags">Deep Learning</span> <h2 class="post_card_title">Kolmogorov-Arnold Networks</h2> </header> <section class="post_card_excerpt"> <p>Kolmogorov-Arnold Networks (KANs) have emerged as a promising advancement in the field of neural networks, offering enhanced interpretability, efficiency, and adaptability compared to traditional architectures like the Multi-Layer Perceptron (MLPs).</p> </section> </a> <footer class="post-card-meta"> <span class="post-card-author"><a href="/author/daniel/">Daniel Alvarez</a></span> </footer> </div> </article> <article class="post-card post tag-deep-learning tag-pytorch no-image"> <div class="post-card-content"> <a class="post-card-content-link" href="/basic-cnn-in-pytorch/"> <header class="post-card-header"> <span class="post-card-tags">Deep Learning</span> <h2 class="post_card_title">Implementing Simple CNN model in PyTorch</h2> </header> <section class="post_card_excerpt"> <p>In this OpenGenus article, we will learn about implementing a simple CNN model using PyTorch Deep Learning framework.</p> </section> </a> <footer class="post-card-meta"> <span class="post-card-author"><a href="/author/vedashree/">Vedashree D</a></span> </footer> </div> </article> <article class="post-card post tag-pytorch tag-deep-learning no-image"> <div class="post-card-content"> <a class="post-card-content-link" href="/how-tensor-is-implemented-in-pytorch-internal/"> <header class="post-card-header"> <span class="post-card-tags">PyTorch</span> <h2 class="post_card_title">Internal Implementation of Tensors in PyTorch</h2> </header> <section class="post_card_excerpt"> <p>In this OpenGenusarticle, we'll delve into the internals of how tensors are implemented in PyTorch, referencing the code from various components of the PyTorch source code repository.</p> </section> </a> <footer class="post-card-meta"> <span class="post-card-author"><a href="/author/vedashree/">Vedashree D</a></span> </footer> </div> </article> <article class="post-card post tag-web-development tag-html no-image"> <div class="post-card-content"> <a class="post-card-content-link" href="/dom-parsing-and-serialization-techniques/"> <header class="post-card-header"> <span class="post-card-tags">Web Development</span> <h2 class="post_card_title">Understanding DOM Parsing and Serialization Techniques</h2> </header> <section class="post_card_excerpt"> <p>This OpenGenus article delves into the intricacies of these processes, shedding light on various parsing methods and serialization approaches.</p> </section> </a> <footer class="post-card-meta"> <img loading="lazy" class="author-profile-image" src="//www.gravatar.com/avatar/909116b220b702d817475718afda4cbb?s&#x3D;250&amp;d&#x3D;mm&amp;r&#x3D;x" alt="Bhekinkosi Daweti" /> <span class="post-card-author"><a href="/author/bheki/">Bhekinkosi Daweti</a></span> </footer> </div> </article> </div> </div> </main> <footer class="site-footer outer"> <div class="site-footer-content inner"> <section class="copyright"><a href="https://iq.opengenus.org">OpenGenus IQ</a> &copy; 2025 All rights reserved ™ [email: <a href="mailto:team@opengenus.org">team@opengenus.org</a>]</section> <nav class="site-footer-nav"> <a href="https://iq.opengenus.org">Top Posts</a> <a href="https://www.linkedin.com/company/opengenus" target="_blank" rel="noopener">LinkedIn</a> <a href="https://twitter.com/OpenGenus" target="_blank" rel="noopener">Twitter</a> </nav> </div> </footer> </div> <script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"> </script> <script type="text/javascript" src="/assets/js/jquery.fitvids.js?v=25723ea4e7"></script> <script async type="text/javascript" src="/assets/js/tab.js?v=25723ea4e7"></script> <!-- for syntax highlight --> <script async type="text/javascript" src="/assets/js/prism.js?v=25723ea4e7"></script> <script> // ===== Scroll to Top ==== $(window).scroll(function() { if ($(this).scrollTop() >= 50) { // If page is scrolled more than 50px $('#scrollBtn').fadeIn(500); // Fade in the arrow } else { $('#scrollBtn').fadeOut(500); // Else fade out the arrow } }); $('#scrollBtn').click(function() { // When arrow is clicked $('body,html').animate({ scrollTop : 0 // Scroll to top of body }, 500); }); </script> <script> var maxPages = parseInt('159'); </script> <script async src="/assets/js/infinitescroll.js?v=25723ea4e7"></script> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-113523348-1"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-113523348-1'); </script> <!-- Google tag (gtag.js) updated GA4 --> <!-- <script async src="https://www.googletagmanager.com/gtag/js?id=G-J52E0WVTY3"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-J52E0WVTY3'); </script> --> <script async src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script> <script>hljs.initHighlightingOnLoad();</script> <script type="text/javascript"> var parent = document.querySelector(".kg-card-markdown p:nth-of-type(2)"); if(parent) parent.insertAdjacentHTML('afterend', '<!-- in between content (post+page) --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-6329206778297580" data-ad-slot="4297062681" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); <\/script>'); </script> <!-- KEY TAKEAWAY --> <style> /* Styling for the key takeaway box */ .key-takeaways { background-color: #d3d3d3; /* Light grey color */ color: #333; /* Dark grey text for contrast */ border: 1px solid #ccc; /* Light grey border */ border-radius: 10px; padding: 20px; margin-bottom: 20px; box-shadow: 3px 3px 5px 0px rgba(0,0,0,0.3); } .key-takeaways ul { list-style-type: disc; margin-left: 10px; } .key-takeaways h2 { text-decoration: underline; margin-bottom: 20px; } </style> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10