wingkwong / leetcode-the-hard-way

LeetCode The Hard Way - From Absolute Beginner to Quitter. Join Discord: https://discord.com/invite/Nqm4jJcyBf
https://linktr.ee/leetcodethehardway
883 stars 221 forks source link

Tutorial Writeup - Binary Search Algorithm #125

Open Rittika1234 opened 2 years ago

Rittika1234 commented 2 years ago

please assign me this issue.

wingkwong commented 2 years ago

Binary Search is already there. Do you want to add more on this topic?

Path: tutorials/basic-topics/binary-search.md

wingkwong commented 2 years ago

If anyone wants to update / add more content in Binary Search, please leave your proposal here.

jadhav-kunal commented 2 years ago

Hey, I have been practising binary search problems on LeetCode and would like to add more content in Binary Search. Could you please assign it to me?

wingkwong commented 2 years ago

@jadhav-kunal Please share your proposal here first. Like how would you change it.

HemantModi11 commented 2 years ago

Hey, I want to work on this. I found one issue in the code that is when the number would be at the border i.e., 2^32 it would give an error called out of bounds while we would be calculating for the value of mid. There is one small change we can do in this code so it works on the border cases also.

wingkwong commented 2 years ago

Hey, I want to work on this. I found one issue in the code that is when the number would be at the border i.e., 2^32 it would give an error called out of bounds while we would be calculating for the value of mid. There is one small change we can do in this code so it works on the border cases also.

which line and what is your small change?

HemantModi11 commented 2 years ago

the value we are calculating mid. mid should be start + (end-start)/2 to avoid error at border cases.

wingkwong commented 2 years ago

the value we are calculating mid. mid should be start + (end-start)/2 to avoid error at border cases.

I think you're talking about integer overflow problem. In the tutorial, the solution is written in Python which doesn't have such problem. It happens when you use languages like C++ or Java. It covers in Tips already.

RaghavAgarwal15 commented 1 year ago

Can you please assign this to me? I would love to make my first contribution ever in this issue

wingkwong commented 1 year ago

@RaghavAgarwal15 assigned. please check out contribution guide first.

RaghavAgarwal15 commented 1 year ago

@RaghavAgarwal15 assigned. please check out contribution guide first.

I have already checked that Just wanted to know if I have to provide my own code? Can it be in C++?

wingkwong commented 1 year ago

@RaghavAgarwal15 Actually the tutorial is already there. I'm expecting one would add more details and examples to explain the topic. Any language is fine and of course you need to write your own code.

RaghavAgarwal15 commented 1 year ago

@RaghavAgarwal15 Actually the tutorial is already there. I'm expecting one would add more details and examples to explain the topic. Any language is fine and of course you need to write your own code.

@wingkwong Hey, I have made the changes which seemed necessary to me. I have added the recursive codes for python,java and c++ and also added few questions which seemed necessary from the my point of view fir interviews and building concepts. I hope ill get my first contibution for the hacktoberfest. If any change required please quote. If this comes successful I'll be happy to contribute to more issues Thankyou

wingkwong commented 1 year ago

@RaghavAgarwal15 You've deleted the checklist. Your PR won't be reviewed.

RaghavAgarwal15 commented 1 year ago

@RaghavAgarwal15 You've deleted the checklist. Your PR won't be reviewed.

From where? I haven't deleted any files sir I am new to this, can you please guide

wingkwong commented 1 year ago

When you create a PR, there is a preset template. You can remove it entirely. Here's the screenshot from another PR.

image

wingkwong commented 1 year ago

Besides, you are adding some code to other author code block, which is not expected. Also I'm expecting more details, rather than just adding a recursive approach without any explanations.

wingkwong commented 6 months ago

Unassigned due to inactivity

Jennifer-tech commented 1 month ago

please is this still available to be assigned? @wingkwong

Jennifer-tech commented 1 month ago

@wingkwong can it have the hacktoberfest label

wingkwong commented 1 month ago

@Jennifer-tech if the repo is tagged with hacktoberfest, then there is no need to add it to each issue / pr.