This repository was archived by the owner on May 18, 2022. It is now read-only.
Open
Conversation
gcnit
reviewed
Oct 4, 2019
| } | ||
|
|
||
| public void splitBalance(String command) { | ||
| String[] expensedata=command.split(" "); |
Collaborator
There was a problem hiding this comment.
Should keep input parsing outside of core logic
Collaborator
There was a problem hiding this comment.
Your execute command would have been a good candidate for parsing and passing an object here.
gcnit
reviewed
Oct 4, 2019
|
|
||
| boolean isValidCommand(String expensedata[],String expenseType,int usersInvolved) | ||
| { | ||
| int sum=0; |
Collaborator
There was a problem hiding this comment.
Should keep separation between different types of expenses. Let's say a new expenseType comes, you'll have to change a lot of your existing methods which should be avoided as much as possible
Collaborator
|
@bsaik7 sorry for the delay! Was busy at work. Code looks good for SDE1 in my opinion! Gave a few comments. Please check. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi Gaurav,
I am Sai Krishna from Flipkart. I am trying for conversion to SDE1 from PSE3 in this November. You Machine Coding Article was helping in my preparation. Kindly review my splitwise code and please provide comments on whether this is enough for SDE1?