Compare Version Numbers | stringstream | StringTokenizer | C++ | JAVA |Leetcode 165|codestorywithMIK
Whatsapp Community Link : https://www.whatsapp.com/channel/0029Va6kVSjICVfiVdsHgi1A
This is the 38th Video of our Playlist "Strings : Popular Interview Problems" by codestorywithMIK
In this video we will try to solve an easy warm-up problem based on strings : Compare Version Numbers | stringstream | split | StringTokenizer | C++ | JAVA | Leetcode 165 | codestorywithMIK
C++ STL Quick Help - https://github.com/MAZHARMIK/Cpp-STL-Quick-Help
I will explain the intuition so easily that you will never forget and start seeing this as cakewalk EASYYY.
We will do live coding after explanation and see if we are able to pass all the test cases.
Also, please note that my Github solution link below contains both C++ as well as JAVA code.
Problem Name : Compare Version Numbers | stringstream | split | StringTokenizer | C++ | JAVA | Leetcode 165 | codestorywithMIK
Company Tags : Apple, Microsoft
My solutions on Github(C++ & JAVA) : https://github.com/MAZHARMIK/Interview_DS_Algo/blob/master/strings/Compare%20Version%20Numbers.cpp
Leetcode Link : https://leetcode.com/problems/compare-version-numbers/
My DP Concepts Playlist : https://youtu.be/7eLMOE1jnls
My Graph Concepts Playlist : https://youtu.be/5JGiZnr6B5w
My Recursion Concepts Playlist : https://www.youtube.com/watch?v=pfb1Zduesi8&list=PLpIkg8OmuX-IBcXsfITH5ql0Lqci1MYPM
My GitHub Repo for interview preparation : https://github.com/MAZHARMIK/Interview_DS_Algo
Instagram : https://www.instagram.com/codestorywithmik/
Facebook : https://www.facebook.com/people/codestorywithmik/100090524295846/
Twitter : https://twitter.com/CSwithMIK
Subscribe to my channel : https://www.youtube.com/@codestorywithMIK
Summary :
In the approach, we simply break the string into tokens based on the delimiter '.' . After getting the tokens, we simply start comparing the revisions.
We figure out the result by comparing their revisions one by one.
Time taken is proportional to length of version1 and version2 = O(m+n)
And we also take space proportional to length of version1 and version2 = O(m+n)
╔═╦╗╔╦╗╔═╦═╦╦╦╦╗╔═╗
║╚╣║║║╚╣╚╣╔╣╔╣║╚╣═╣
╠╗║╚╝║║╠╗║╚╣║║║║║═╣
╚═╩══╩═╩═╩═╩╝╚╩═╩═╝
✨ Timelines✨
00:00 - Introduction
#coding #helpajobseeker #easyrecipes #leetcode #leetcodequestionandanswers #leetcodesolution #leetcodedailychallenge #leetcodequestions #leetcodechallenge #hindi #india #coding #helpajobseeker #easyrecipes #leetcode #leetcodequestionandanswers #leetcodesolution #leetcodedailychallenge#leetcodequestions #leetcodechallenge #hindi #india #hindiexplanation #hindiexplained #easyexplaination #interview#interviewtips #interviewpreparation #interview_ds_algo #hinglish #github #design #data #google #video #instagram #facebook #leetcode #computerscience #leetcodesolutions #leetcodequestionandanswers #code #learning #dsalgo #dsa #newyear2024