Featured Post

Hello! and Greetings! Nice to see you on my blog.

 

8/13/2022

LeetCode Day 25

 Maf time.

I liked this section. Hard, but lovely to do. Integers really aren't that big into a machine. Also binary search is crazy. Its so amazing. Cuts down on time so much.


Maf notes:

- I finished up the math section. The two problems I encountered were sqrt and pow without using built in functions. The pow one was relatively medium to come up with the solution. 

I came up with close to the best solution. 

- The second one which was sqrt(x) was so hard to come up with the solution. It was an "easy" problem but I had to use the hints. Once I used the hints however, it was easy to come up with the solution.

- Something pretty dam important to note is that the range of integers really isn't that big. You can easily use binary search on the realm of integers to find one that you like.

- Log(integers) is something like 32 or something. Really efficient.

- Anyways I had to do that to find the correct integer because there was really no other way. Binary search came in clutch. If you're ever lost trying to find an "integer" in a hay stack, try using binary search. I had to find the correct number that was the square root of some other number. There is no real way to do that besides guessing and check. (binary search)


No comments:

Post a Comment