init from origin + update
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"title" : "Arrays and Strings",
|
||||
"slug" : "arrays-and-strings",
|
||||
"content": [
|
||||
{"data":"## Arrays and String"},
|
||||
{"data":"An array is a collection of similar type of elements that are stored in a contiguous memory location. Arrays can contain primitives(int, char, etc) as well as object(non-primitives) references of a class depending upon the definition of the array. In the case of primitive data type, the actual values are stored in contiguous memory locations whereas in the case of objects of a class the actual objects are stored in the heap segment. In Java, all the arrays are allocated dynamically. The size of an array must be specified by an int value and not long or short. The array index starts from 0 and goes up to n-1 where n is the length of the array."},
|
||||
{"data":"#### Array Declaration Syntax"},
|
||||
{"data": "An array declaration has two components: the type and the var-name. The type declares the element type of the array. The element type determines the data type of each element that comprises the array. The var-name declares the name of the array variable. Like an array of int type, we can also create an array of other primitive data types like char, float, double…etc."}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"title": "Dynamic programming",
|
||||
"slug": "dynamic-programming",
|
||||
"content": [
|
||||
{"data":"## Hello markdown"},
|
||||
{"data":"Dynamic programming is both a mathematical optimization method and a computer programming method. The method was developed by Richard Bellman in the 1950s and has found applications in numerous fields, from aerospace engineering to economics. In both contexts it refers to simplifying a complicated problem by breaking it down into simpler sub-problems in a recursive manner. While some decision problems cannot be taken apart this way, decisions that span several points in time do often break apart recursively. Likewise, in computer science, if a problem can be solved optimally by breaking it into sub-problems and then recursively finding the optimal solutions to the sub-problems, then it is said to have optimal substructure.If sub-problems can be nested recursively inside larger problems, so that dynamic programming methods are applicable, then there is a relation between the value of the larger problem and the values of the sub-problems.[1] In the optimization literature this relationship is called the Bellman equation."},
|
||||
{"data":"#### Mathematical optimization"},
|
||||
{"data": "In terms of mathematical optimization, dynamic programming usually refers to simplifying a decision by breaking it down into a sequence of decision steps over time. This is done by defining a sequence of value functions V1, V2, ..., Vn taking y as an argument representing the state of the system at times i from 1 to n. The definition of Vn(y) is the value obtained in state y at the last time n. The values Vi at earlier times i = n −1, n − 2, ..., 2, 1 can be found by working backwards, using a recursive relationship called the Bellman equation. For i = 2, ..., n, Vi−1 at any state y is calculated from Vi by maximizing a simple function (usually the sum) of the gain from a decision at time i − 1 and the function Vi at the new state of the system if this decision is made. Since Vi has already been calculated for the needed states, the above operation yields Vi−1 for those states. Finally, V1 at the initial state of the system is the value of the optimal solution. The optimal values of the decision variables can be recovered, one by one, by tracking back the calculations already performed."}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"title" : "Linked list",
|
||||
"slug" : "linked-list",
|
||||
"content": [
|
||||
{"data":"# Hello markdown"},
|
||||
{"data":"# Hello markdown"}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"title" : "Overview",
|
||||
"slug" : "overview",
|
||||
"content": [
|
||||
{"data":"## Overview"},
|
||||
{"data":"In this explore card, we're going to go over the basics of DP, provide you with a framework for solving DP problems, learn about common patterns, and walk through many examples.No prior knowledge of DP is required for this card, but you will need a solid understanding of recursion, a basic understanding of what greedy algorithms are, and general knowledge such as big O and hash tables. If you aren't familiar with recursion yet, check out the recursion explore card first."}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user