Skip to content

Aggressive Cows Problem Statement Solution #802

@dewanshiPaul

Description

@dewanshiPaul

Description

A question solving using binary search with proper documentation of it. The question as follows:-
There is a new barn with N stalls and C cows. The stalls are located on a straight line at positions x1,….,xN (0 <= xi <= 1,000,000,000). We want to assign the cows to the stalls, such that the minimum distance between any two of them is as large as possible. What is the largest minimum distance?

Domain

Other

Type of Contribution

Addition

Code of Conduct

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions