Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Manhattan Distance & Closest Pair Algorithm #2072

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

Open
Tarun2605 wants to merge 3 commits into trekhleb:master
base: master
Choose a base branch
Loading
from Tarun2605:master

Conversation

Copy link

@Tarun2605 Tarun2605 commented Aug 28, 2025
edited
Loading

Pull Request: Manhattan Distance & Closest Pair Algorithm

Summary

I have implemented Manhattan distance calculation functionality and also finding the closes pair of points when we are given a list of points in d dimensions

Key Contributions

1. Manhattan Distance Function

  • It will take two parameters a and b that will return the distance between the manhattan distance between them
  • Time complexity: O(d) where d is the dimenstion

2. Minimum Manhattan Distance Algorithm

  • This algorithm takes a list of points of d dimension and returns the shortest manhattan distance among the pairs
  • Optimum Time Complexity O(n log n · 2^d) where n is the number of points given in the list and d is the dimension of the points

@Tarun2605 Tarun2605 changed the title (削除) Manhattan Distances (削除ここまで) (追記) Manhattan Distance & Closest Pair Algorithm (追記ここまで) Aug 28, 2025
@Tarun2605 Tarun2605 marked this pull request as draft August 28, 2025 10:25
@Tarun2605 Tarun2605 marked this pull request as ready for review August 28, 2025 10:26
Copy link

Write the description yourself.

Copy link
Author

You mean the PR description? Sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /