Two Sum with Hash Map || Most asked Java Coding Interview Questions and Answers

preview_player
Показать описание
In this video I have solved Two sum problem using Java, which is most commonly asked interview question for experience as well as fresher.

Udemy Course of Code Decode on Microservice k8s AWS CICD link:

Course Description Video :

We target to cover most of the questions covered in leetcode.

So what is LeetCode :
It’s a website where people–mostly software engineers–practice their coding skills. There are 800+ questions (and growing), each with multiple solutions. Questions are ranked by level of difficulty: easy, medium, and hard.
LeetCode basically has more questions, better quality, plus a strong user base.

The primary reasons why our users LeetCode: to prepare for the technical portion of a job interview.
LeetCode and the like have risen in use because of the way interviews have evolved. Engineers believe that these resources help prepare them for what they will encounter in today’s technical aptitude screenings.

LeetCode questions are often asked during interviews at the elite tech companies: Facebook, Amazon, Apple, Netflix, and Google., some more than at others. Among the Big Five, Amazon is said to place the least emphasis on LeetCode.

LeetCode is one of the most well-known online judge platforms that you can use to practice your programming skills by solving coding questions. It has over 1,100 different problems, support for over 18 programming languages, and an active community that is always there to help you with the solutions you come up with. If your intention is to hone your coding skills, then this online judge platform is one of the best that you can use.

In this video we have solved Two sum problem using Java, which is most commonly asked interview question for experience as well as fresher.

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.



Example 1:

Input: nums = [2,7,11,15], target = 9
Output: [0,1]
Output: Because nums[0] + nums[1] == 9, we return [0, 1].
Example 2:

Input: nums = [3,2,4], target = 6
Output: [1,2]
Example 3:

Input: nums = [3,3], target = 6
Output: [0,1]

Only one valid answer exists.

-------------------------------------------------------------------------------------------------------------------------------------

Code Decode Playlists

-------------------------------------------------------------------------------------------------------------------------------------
Subscriber and Follow Code Decode

--------------------------------------------------------------------------------------------------------------------------------------

#javacodinginterviewquestion #twosumwithhashmap #twosumleetcode #codedecode
Рекомендации по теме
Комментарии
Автор

why you guys suddenly stopped this coding session .please continue them, they help

shubhamkumar-gwvb
Автор

please make such more videos .they are really helpful

sheikhmohduzair
Автор

A big help .. Awesome explanation big bro .. Thanks alot 😇😇

z_Guy
Автор

Question: If the key of Hashmap is Immutable Object(properly create by developer with no mistake or let's say it's String class object) then do we need to Or having immutable field as key solves the problem of

gokulaher
Автор

Please make videos on Data Structures first so it will easy for the viewers to scale up

kirushnashirre