Python Programming Practice: LeetCode #16 -- 3Sum Closest

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 ก.ย. 2024
  • In this episode of Python Programming Practice: LeetCode #16 -- 3Sum Closest
    Link to the problem here:
    leetcode.com/p...
    This video builds upon the solution to 3 Sum covered in this video:
    • Python Programming Pra...
    If you don't know Python, you can learn the basics of Python for data analysis by following along with this TH-cam guide I created: • Python for Data Analysis
    Python Programming Practice is a series focused on teaching practical coding skills by solving exercises on popular coding websites. Note that the solutions seen here may not be the most efficient possible.
    I am not going to provide the full code in the video description for this series, since copy and pasting solutions is not in the spirit of doing coding exercises. It is intended that the video will help you think about problems, approaches and how to structure solutions so that you are able to code up a working solution yourself.

ความคิดเห็น • 9

  • @symbol767
    @symbol767 2 ปีที่แล้ว

    This is the best explanation on TH-cam for this problem, thank you!

  • @a_maxed_out_handle_of_30_chars
    @a_maxed_out_handle_of_30_chars 10 หลายเดือนก่อน +1

    this was awesome, thank you :)

  • @kishankumar-pn3tj
    @kishankumar-pn3tj ปีที่แล้ว

    Could we expect more such videos (leetcode problems)in future ???

  • @jellyoful
    @jellyoful ปีที่แล้ว

    Great explanation.

  • @skms31
    @skms31 2 ปีที่แล้ว

    I also feel this is a very good approach to the problem

  • @Zoronoa01
    @Zoronoa01 2 ปีที่แล้ว +1

    this solution now gives Time Limit Exceeded Error :/

    • @ugochukwustephenmbonu7974
      @ugochukwustephenmbonu7974 2 ปีที่แล้ว +1

      yeah, sometimes it does but try submitting several times, it should work sometimes. Though it won't be a very fast solution

    • @rahul_singh_rajput3292
      @rahul_singh_rajput3292 2 ปีที่แล้ว +1

      yes In my case also but i resubmitted now it get accepted..

    • @howheels
      @howheels 2 ปีที่แล้ว

      This solution can be easily improved by using divide and conquer - use a midpoint between L and R pointers. That will get you within the top 95% of submissions