"use strict";(self.webpackChunkfi=self.webpackChunkfi||[]).push([[8442],{3905:(a,e,t)=>{t.d(e,{Zo:()=>o,kt:()=>h});varn=t(7294);functions(a,e,t){returneina?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}functionm(a,e){vart=Object.keys(a);if(Object.getOwnPropertySymbols){varn=Object.getOwnPropertySymbols(a);e&&(n=n.filter((function(e){returnObject.getOwnPropertyDescriptor(a,e).enumerable}))),t.push.apply(t,n)}returnt}functionp(a){for(vare=1;e<arguments.length;e++){vart=null!=arguments[e]?arguments[e]:{};e%2?m(Object(t),!0).forEach((function(e){s(a,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):m(Object(t)).forEach((function(e){Object.defineProperty(a,e,Object.getOwnPropertyDescriptor(t,e))}))}returna}functionr(a,e){if(null==a)return{};vart,n,s=function(a,e){if(null==a)return{};vart,n,s={},m=Object.keys(a);for(n=0;n<m.length;n++)t=m[n],e.indexOf(t)>=0||(s[t]=a[t]);returns}(a,e);if(Object.getOwnPropertySymbols){varm=Object.getOwnPropertySymbols(a);for(n=0;n<m.length;n++)t=m[n],e.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(a,t)&&(s[t]=a[t])}returns}varl=n.createContext({}),i=function(a){vare=n.useContext(l),t=e;returna&&(t="function"==typeofa?a(e):p(p({},e),a)),t},o=function(a){vare=i(a.components);returnn.createElement(l.Provider,{value:e},a.children)},N="mdxType",c={inlineCode:"code",wrapper:function(a){vare=a.children;returnn.createElement(n.Fragment,{},e)}},k=n.forwardRef((function(a,e){vart=a.components,s=a.mdxType,m=a.originalType,l=a.parentName,o=r(a,["components","mdxType","originalType","parentName"]),N=i(t),k=s,h=N["".concat(l,".").concat(k)]||N[k]||c[k]||m;returnt?n.createElement(h,p(p({ref:e},o),{},{components:t})):n.createElement(h,p({ref:e},o))}));functionh(a,e){vart=arguments,s=e&&e.mdxType;if("string"==typeofa||s){varm=t.length,p=newArray(m);p[0]=k;varr={};for(varline)hasOwnProperty.call(e,l)&&(r[l]=e[l]);r.originalType=a,r[N]="string"==typeofa?a:s,p[1]=r;for(vari=2;i<m;i++)p[i]=t[i];returnn.createElement.apply(null,p)}returnn.createElement.apply(null,t)}k.displayName="MDXCreateElement"},7527:(a,e,t)=>{t.r(e),t.d(e,{assets:()=>l,contentTitle:()=>p,default:()=>c,frontMatter:()=>m,metadata:()=>r,toc:()=>i});varn=t(7462),s=(t(7294),t(3905));constm={id:"pyramid-slide-down",title:"Introduction to dynamic programming",description:"Solving a problem in different ways.\n",tags:["java","recursion","exponential","greedy","dynamic-programming","top-down-dp","bottom-up-dp"],last_updated:{date:newDate("2023-08-17T00:00:00.000Z")}},p=void0,r={unversionedId:"recursion/pyramid-slide-down",id:"recursion/pyramid-slide-down",title:"Introduction to dynamic programming",description:"Solving a problem in different ways.\n",source:"@site/ib002/04-recursion/2023-08-17-pyramid-slide-down.md",sourceDirName:"04-recursion",slug:"/recursion/pyramid-slide-down",permalink:"/ib002/recursion/pyramid-slide-down",draft:!1,editUrl:"https://gitlab.com/mfocko/blog/tree/main/ib002/04-recursion/2023-08-17-pyramid-slide-down.md",tags:[{label:"java",permalink:"/ib002/tags/java"},{label:"recursion",permalink:"/ib002/tags/recursion"},{label:"exponential",permalink:"/ib002/tags/exponential"},{label:"greedy",permalink:"/ib002/tags/greedy"},{label:"dynamic-programming",permalink:"/ib002/tags/dynamic-programming"},{label:"top-down-dp",permalink:"/ib002/tags/top-down-dp"},{label:"bottom-up-dp",permalink:"/ib002/tags/bottom-up-dp"}],version:"current",lastUpdatedAt:1694110423,formattedLastUpdatedAt:"Sep 7, 2023",frontMatter:{id:"pyramid-slide-down",title:"Introduction to dynamic programming",description:"Solving a problem in different ways.\n",tags:["java","recursion","exponential","greedy","dynamic-programming","top-down-dp","bottom-up-dp"],last_updated:{date:"2023-08-17T00:00:00.000Z"}},sidebar:"autogeneratedBar",previous:{title:"Recursion and backtracking with Robot Karel",permalink:"/ib002/recursion/karel-1"},next:{title:"Red-Black Trees",permalink:"/ib002/category/red-black-trees"}},l={},i=[{va