3076. Shortest Uncommon Substring in an Array | Implementation | Time Complexity Analysis
In this video, I'll talk about how to solve Leetcode 3076. Shortest Uncommon Substring in an Array | Implementation | Time Complexity Analysis
Checkout DSA-169 Series: • Aryan DSA-169 Series |...
100Days 100k Placements: • 100 Days 100K Placement
Let's Connect:
📝Linkedin: / aryan-mittal-0077
📸 Instagram: / ez.pz.dsa
📱Telegram : t.me/aryan_mittal_group
🤖 Github: github.com/aryan-0077
About Me:
I am Aryan Mittal - A Software Engineer in Goldman Sachs, Speaker, Creator & Educator. During my free time, I create programming education content on this channel & also how to use that to grow :)
✨ Timelines✨
✨ Hashtags ✨
#programming #Interviews #leetcode #faang #maang #datastructures #algorithms
Пікірлер: 19
Nice explanation bro😊
Man I knew brute force but I thought my solution was wrong I never thought about the constraints part
❤❤❤no one explain like this .thank u...
Nicely explained
Thankyou so much bro😊
great ! I knew you would have posted a great solution so I came here and as expected :)
mene contest mae same logic socha tha but implement nahi ho paya tha😇
@PramodKumar-bu2uf
4 ай бұрын
thanks bhaiya ❤
thank you so much....I tried the code for 2 hours....but didn't get it....very good explanation👍👍❤
Superbly explained brother. Thanks a lot🙏❤
I didn't came up with a solution of this during the contest
thanks bhai, video banane ke liye :)
during the contest i did solve it i got 631 testcases passed but still no submission due to MLE
Badiya tha bhai but written code bhi de dete to phle khud se samjhne ki kosis krta phir video bhi dekhta. Although good explanation
if the values of n is more and length of string is more than mentioned in the string . could you please give me approach to solve that ?
@sudiptadas7455
Ай бұрын
Use trie data structure
class Solution { public: vector shortestSubstrings(vector& arr) { int n = arr.size(); vector ans(n,""); unordered_map mp; for (int k = 0; k string s = arr[k]; int sz = s.size(); for (int i = 0; i for (int j = i; j string sub = s.substr(i, j - i + 1); mp[i].insert(sub); } } } // Printing elements of the map for(int k=0;k
@ronakkriplani1838
4 ай бұрын
got in i have made mistake in creating substrings ,I have used M[i] but i shoud use M[k[
Bro try to provide notes