LeetCode 1 | Two Sum | All Solutions Explained | Java + Whiteboard

preview_player
Показать описание
Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.

You may assume that each input would have exactly one solution, and you may not use the same element twice.

You can return the answer in any order.

Running Time: O(N)
Space Complexity: O(N)

Always be pluggin:
Рекомендации по теме
Комментарии
Автор

Hey, this channel is super cool, helps a lot!!

nancyagarwal
Автор

That was a nice explanation! Wish you good luck for your channel :) @Xavier Elon can you recommend any resources for learning data structures? I think I know them a bit, but need to be really good at it so that I can quickly recognize the patterns and solve the problems more efficiently

himanimishra
Автор

You explain very well !
I've seen lots and lots of problem solving tutorials and I'd say your method was one of the few I really liked :)
Could you please tell me how to get better at problem solving ? I struggle even with the easy ones :(

manidixit