String Tech Interview Que @ google, meta, amazon - Longest Substring Without Repeating Characters: 3

preview_player
Показать описание
#string #char #technical #interview #question #leetcode #problem #hashset #google #facebook #twitter #microsoft #amazon #apple #meta #uber #bloomberg #paytm #tesla #tiktok #bigO

This is the most asked String technical interview question, from Leetcode.

Learn to solve this amazing Leetcode medium, Matrix problem that has been asked in hundreds of technical interviews at companies like Google, Facebook, Amazon, Microsoft, Meta, apple, Uber, Twitter, Bloomberg.

Problem: Longest Substring Without Repeating Characters- Leetcode 3

Leetcode: 3

Not stopping till we get employed in FAANG.

This Problem was recently asked in following companies in Technical Coding Interview:

Amazon technical interview,
Microsoft technical interview,
Facebook technical interview,
Bloomberg technical interview,
Apple technical interview,
Google technical interview,
Spotify technical interview,
Adobe technical interview,
Uber technical interview,
Goldman Sachs technical interview,
VMware technical interview,
Oracle technical interview,
Yahoo technical interview,
Walmart Global Tech technical interview,
Salesforce technical interview,
Zoho technical interview,
Paypal technical interview,
Samsung technical interview,
Intuit technical interview,
Yandex technical interview,
eBay technical interview,
Alation technical interview,
ServiceNow technical interview,
Zillow technical interview,
Docusign technical interview,
Lyft technical interview,
SAP interview,
Visa technical interview,
American Express technical interview,
Nvidia technical interview,
IBM technical interview,
Rubrik interview,
ByteDance technical interview,
Cisco technical interview,
Morgan Stanley technical interview,
PayTM technical interview,
Expedia interview,
Coupang interview,
tcs technical interview,
Huawei technical interview,
Tesla technical interview,
Atlassian interview,
Splunk technical interview,
Wayfair technical interview,
tiktok technical interview,
Accenture technical interview,
Yelp technical interview,
--------------------------------------------------------------
(Contact me if you want to sponsor your product):

List of Most Important Questions and Solutions:

GitHub Repository for Questions solved so far:

(Support the channel, if videos helps you in any manner... Give me a Coffee)

About me and My Purpose:

I am a software engineer with 5+ years of experience @ Non-FAANG company. I have always been bad at coding and really bad at programming interviews. So, once I got employed in IT industry, I only worked on operational activities (just so I can avoid coding).

But deep down I always wanted to work at an Elite IT company. So, I decided to face my fears, and to master coding & technical Interviews. I started with LeetCoding 1 problem a day. But I was facing issues with consistency, I would solve LC problems for week, and then drop it for 2-3 weeks. This lasted till 6 months.

And upon deeper investigation I found that I was not committed enough. Then suddenly my wife gave me an idea, that rather then focusing on solving a LC problem for my-self, why don't I commit to make videos on solving the LC problems. And try to complete at-least one video every alternate day. Hence, I started this channel.

My ultimate aim is to get into FAANG company, and also create a channel in such a way that anyone wants to get into FAANG, if they just follow my channel, they should be able to clear all the FAANG Technical Interviews.

Here are few more reasons on why I started the channel.
1) To have a motive for me to solve leetcode problems.
2) In order to solve a LC problem, first I have to really understand the problem and explain my thought process, which solidifies my concepts.
3) I can document my progress. Also learn a new skill on how to run a YT channel.
4) My work can help other software engineers.
5) I can have something cool to mention in my linked-in and resume.
------------------

Here is a list of my dream Companies:

FAANG,
Meta,
Facebook,
Google,
Amazon,
Netflix,
Microsoft,
apple,
doordash,
roblox,
stripe,
instacart,
uber,
lyft,
twitter,
linked In,
pinetrest,
bloomberg,
robinhood,
Goldman Sachs,
box,
two sigma,
byte dance,
tik tok,
air bnb,
nuro,
ui path,
oracle,
twitch,
data bricks,
waymo,
dropbox,
coinbase,
snowflake,
snap,
nvdia,
broadcom,
slack,
intel,
cisco,
indeed,
salesforce,
reddit,
wayfair,
okta,
splunk,
service now,
coursera,
square,
upgrade,
mozilla,
yelp,
unity,
ebay,
affirm,
stach adapt,
amplitude,
github,
wish,
brex,
etsy,
chime,
shopify,
amd,
GoDaddy,
IBM

Introduction: 00:00
Understanding the Problem Statement: 00:38
Brute Force: 01:19
Optimal Solution: 03:08
Coding: 09:12
Рекомендации по теме
Комментарии
Автор

GitHub Repository for all the problems solved so far


JAVA Solution

class Solution {
public int s) {

if(s == null || s.length()==0){
return 0;
}

if(s.length() == 1){
return 1;
}

int left = 0;
int right = 0;
int ans = 0;

HashSet<Character> set = new HashSet<>();

while(right < s.length()){
char c = s.charAt(right);
while(set.contains(c)){
set.remove(s.charAt(left));
left++;
}
set.add(c);
ans = Math.max(ans, right-left + 1);
right++;
}

return ans;
}
}

DestinationFAANG
Автор

So interesting life is, ...when I was a newbie in coding. I did this same question like 10-15 times, but used to forget it always. Now after 1yr of extensive hardwork, I retried it one fine day during my practice session, and did it in one go...then I checked the logs and to my surprise I found that I did this same question like 15times wrong in previous year.

Practice really takes you to perfection. I experienced this first hand

depression_plusplus