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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dynamic programming #1742

Open
wants to merge 5 commits into
base: master
from
Open

Conversation

@sumitmohite0501
Copy link

@sumitmohite0501 sumitmohite0501 commented Oct 11, 2020

I have added two efficient program 1) primitive calculator 2) placing parenthesis

Create primitive_calculator
Create placing parenthesis
@@ -0,0 +1,27 @@
import java.util.Scanner;

public class PlacingParentheses {

This comment has been minimized.

@akashchandwani

akashchandwani Oct 11, 2020

Please use proper file name for this file - PlacingParentheses.java

This comment has been minimized.

@sumitmohite0501

sumitmohite0501 Oct 12, 2020
Author

sir i have commit 7711622 changes that you suggest

public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
String exp = scanner.next();
System.out.println(getMaximValue(exp));

This comment has been minimized.

@akashchandwani

akashchandwani Oct 11, 2020

getMaximValue(exp) always returns 0

@@ -0,0 +1,27 @@
import java.util.Scanner;

This comment has been minimized.

@akashchandwani

akashchandwani Oct 11, 2020

Please provide description of what this algorithms solves.

@@ -0,0 +1,29 @@
import java.util.*;

public class PrimitiveCalculator {

This comment has been minimized.

@akashchandwani

akashchandwani Oct 11, 2020

Above comments applicable to this file as well.

return 0;
}

private static long eval(long a, long b, char op) {

This comment has been minimized.

@akashchandwani

akashchandwani Oct 11, 2020

How is this algorithm in Dynamic Programming?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.