Skip to content

Proposed changes amazon interview#2

Open
vipulbalina wants to merge 4 commits intoRohit91singh9:mainfrom
vipulbalina:ProposedChanges_AmazonInterview
Open

Proposed changes amazon interview#2
vipulbalina wants to merge 4 commits intoRohit91singh9:mainfrom
vipulbalina:ProposedChanges_AmazonInterview

Conversation

@vipulbalina
Copy link

Result.getServedBuildings(...) method:
Two approaches were explored:

Naive simulation using array updates based on each router’s range.

Optimized solution using a prefix sum (difference array) to improve performance for larger inputs.

Router helper class:
Encapsulates the router’s location and range for clarity and maintainability.

FastReader utility class:
Enables efficient input parsing in a competitive programming format.

main() method:
Reads input, processes the data, and prints the number of buildings that are adequately served.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant