Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

migrated knapsack article #105

Merged
merged 16 commits into from
Jul 10, 2020
Merged

migrated knapsack article #105

merged 16 commits into from
Jul 10, 2020

Conversation

hectorkambow
Copy link
Contributor

(this PR was a different process) 馃
migrated knapsack article
added article images (couldnt get path)
added hero image (couldnt get path)

added article images (couldnt get path)
added hero image (couldnt get path)
@hectorkambow hectorkambow mentioned this pull request Jun 30, 2020
@hectorkambow hectorkambow added the ready for review Article is properly formatted in correct folder structure and ready for review label Jun 30, 2020
@ninjaginja ninjaginja added the revisions needed Have requested revisions from the author. label Jul 7, 2020
@ninjaginja
Copy link
Contributor

@jorqueraian Can you double check the syntax on the mathjax snippet starting on line 62? This is how it's currently appearing:
Screen Shot 2020-07-09 at 4 57 33 PM

@jorqueraian
Copy link

@jorqueraian Can you double check the syntax on the mathjax snippet starting on line 62? This is how it's currently appearing:
Screen Shot 2020-07-09 at 4 57 33 PM

Interesting. Im not sure why it isn't displaying correctly. just in case something was lost in an edit, here is what I have saved on my computer

$$ 
k[i,j]=\left\{
\begin{array}{l}
      \max(v_i+k[i-1,j-w_i],\, k[i-1,j]) & w_i \leq j\\
      k[i-1,j]  &\text{otherwise}\\
\end{array} 
\right.
$$

this compiles correctly for me in stackedit.
image

I'm not totally sure why this wouldn't work. Here is also an alternative solution using aligned instead of the array, and this also compiled correctly on my end.

$$  
k[i,j]=\left\{
\begin{aligned}  
	&\max(v_i+k[i-1,j-w_i],\, k[i-1,j]) &&w_i \leq j\\
	&k[i-1,j] &&\text{otherwise}\\
\end{aligned}  
\right.
$$

It could also be a problem with the additional whitespace I have added so maybe this works

$$k[i,j]=\left\{\begin{array}{l}\max(v_i+k[i-1,j-w_i],\,k[i-1,j])&w_i\leq j\\k[i-1,j] &\text{otherwise}\\\end{array}\right.$$

If this solution still doesn't work I think an image of the equation would also be fine. Here is one with a transparent background
latex_knapsack

@ninjaginja ninjaginja merged commit 72bec3f into master Jul 10, 2020
@ninjaginja
Copy link
Contributor

ninjaginja commented Jul 10, 2020

Thanks @jorqueraian ! Wrapping the block in a div tag seemed to do the trick :) (more info here, if interested)

@ninjaginja ninjaginja deleted the knapsack branch April 21, 2021 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for review Article is properly formatted in correct folder structure and ready for review revisions needed Have requested revisions from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants