- Видео 163
- Просмотров 1 461 181
Technosage
Индия
Добавлен 11 мар 2018
Hello viewers,
Welcome to the RUclips channel Techosage. This channel aims to explore the technical world, be it learning how to code or just understanding how technical stuffs work in real world.
Technosage's content is available in both English and Hindi.
This page is managed by Manoj Sharma (Software Engineer at VMware)and Amrita (Software Engineer at Oracle)
Please subscribe to the channel and do let us know in the comment section, what you want from us to be covered as part of our videos.
Thankyou!!
Welcome to the RUclips channel Techosage. This channel aims to explore the technical world, be it learning how to code or just understanding how technical stuffs work in real world.
Technosage's content is available in both English and Hindi.
This page is managed by Manoj Sharma (Software Engineer at VMware)and Amrita (Software Engineer at Oracle)
Please subscribe to the channel and do let us know in the comment section, what you want from us to be covered as part of our videos.
Thankyou!!
Product of Array Except Self | Leetcode 238 | Top 150 interview question series
Top 150 interview question series
Product of Array Except Self
Leetcode problem number 238
JAVA interview programming playlist:
ruclips.net/p/PLjOcsOwEjb12MCtmFfCWoQgtMIW1pCbD4
Product of Array Except Self
Leetcode problem number 238
JAVA interview programming playlist:
ruclips.net/p/PLjOcsOwEjb12MCtmFfCWoQgtMIW1pCbD4
Просмотров: 12
Видео
Valid Parentheses | Leetcode 20 | Top 150 interview question series
Просмотров 3,1 тыс.3 месяца назад
Top 150 interview question series Valid Parentheses Leetcode problem number 20 JAVA interview programming playlist: ruclips.net/p/PLjOcsOwEjb12MCtmFfCWoQgtMIW1pCbD4
Roman to Integer | Leetcode 13 | Top 150 interview question series
Просмотров 4,1 тыс.3 месяца назад
Top 150 interview question series Roman to Integer Leetcode problem number 13 JAVA interview programming playlist: ruclips.net/p/PLjOcsOwEjb12MCtmFfCWoQgtMIW1pCbD4
Find words containing character | Leetcode 2942
Просмотров 1,1 тыс.3 месяца назад
Find words containing character Leetcode problem number 2942 JAVA interview programming playlist: ruclips.net/p/PLjOcsOwEjb12MCtmFfCWoQgtMIW1pCbD4
Merge strings alternately | Leetcode 1768
Просмотров 1,3 тыс.4 месяца назад
Merge strings alternately. Leetcode problem number 1768. JAVA interview programming playlist: ruclips.net/p/PLjOcsOwEjb12MCtmFfCWoQgtMIW1pCbD4
Rotate Array | Leetcode 189 | Top 150 interview question series
Просмотров 38 тыс.Год назад
Top 150 interview question series Rotate Array Leetcode problem number 189 JAVA interview programming playlist: ruclips.net/p/PLjOcsOwEjb12MCtmFfCWoQgtMIW1pCbD4
Majority Element | Leetcode 169 |Moore's voting algorithm | Top 150 interview question series
Просмотров 26 тыс.Год назад
Top 150 interview question series Majority Element Leetcode problem number 169 JAVA interview programming playlist: ruclips.net/p/PLjOcsOwEjb12MCtmFfCWoQgtMIW1pCbD4 Git Repo: github.com/Technosagelearning/Technosage/blob/main/Interview_programming_solutions/MajorityElement.java
Remove Duplicates from Sorted Array 2 | Leetcode 80 | Top 150 Interview questions series
Просмотров 29 тыс.Год назад
Top 150 interview question series Remove Duplicates from Sorted Array 2 Leetcode problem number 80 JAVA interview programming playlist: ruclips.net/p/PLjOcsOwEjb12MCtmFfCWoQgtMIW1pCbD4 Git Repo: github.com/Technosagelearning/Technosage/blob/main/Interview_programming_solutions/RemoveDuplicatesFromSortedArray2.java
Time Complexity | A practical approach | Big O
Просмотров 1,2 тыс.Год назад
This video talks about the Time complexity of an algorithm, Big O notation, Time complexity as a function of input size and practical approach to time complexity. LinkedIn: www.linkedin.com/in/manoj-sharma-4a1341a3
Remove Duplicates from Sorted Array | Leetcode 26 | Top 150 interview question series
Просмотров 55 тыс.Год назад
Top 150 interview question series Remove Duplicates from Sorted Array Leetcode problem number 26 JAVA interview programming playlist: ruclips.net/p/PLjOcsOwEjb12MCtmFfCWoQgtMIW1pCbD4 Git Repo: github.com/Technosagelearning/Technosage/blob/main/Interview_programming_solutions/RemoveDuplicatesFromSortedArray.java
Find the Distinct Difference Array | Leetcode 2670 | Weekly Contest 344
Просмотров 1,7 тыс.Год назад
Find the Distinct Difference Array Leetcode problem number 2670 JAVA interview programming playlist: ruclips.net/p/PLjOcsOwEjb12MCtmFfCWoQgtMIW1pCbD4 Git Repo: github.com/Technosagelearning/Technosage/blob/main/Interview_programming_solutions/distinctDifferenceArray.java
Count the Number of Vowel Strings in Range | Leetcode 2586
Просмотров 2,2 тыс.Год назад
Count the Number of Vowel Strings in Range | Leetcode 2586
Find all Lonely Numbers in the Array | Leetcode 485
Просмотров 1,9 тыс.Год назад
Find all Lonely Numbers in the Array | Leetcode 485
Find Lucky Integer in an Array | Leetcode 1394
Просмотров 2,8 тыс.Год назад
Find Lucky Integer in an Array | Leetcode 1394
Maximum Subarray | Kadane's Algorithm | Leetcode 53
Просмотров 16 тыс.Год назад
Maximum Subarray | Kadane's Algorithm | Leetcode 53
Check if a Word Occurs As a Prefix of Any Word in a Sentence | Leetcode 1455
Просмотров 4,3 тыс.Год назад
Check if a Word Occurs As a Prefix of Any Word in a Sentence | Leetcode 1455
Find the index of the first occurrence in a string | Leetcode 28 | O(n) time Complexity
Просмотров 5 тыс.Год назад
Find the index of the first occurrence in a string | Leetcode 28 | O(n) time Complexity
Is Subsequence | LeetCode problem 392
Просмотров 7 тыс.Год назад
Is Subsequence | LeetCode problem 392
Advanced Excel Course [FULL COURSE in 2 Hours]
Просмотров 412Год назад
Advanced Excel Course [FULL COURSE in 2 Hours]
Search in Rotated Sorted Array | LeetCode problem 33
Просмотров 6 тыс.Год назад
Search in Rotated Sorted Array | LeetCode problem 33
Concatenated Words | LeetCode problem 472
Просмотров 2,2 тыс.Год назад
Concatenated Words | LeetCode problem 472
Contains Duplicate II | LeetCode problem 219
Просмотров 15 тыс.Год назад
Contains Duplicate II | LeetCode problem 219
Missing Number | LeetCode problem 268
Просмотров 12 тыс.Год назад
Missing Number | LeetCode problem 268
after long time 🙌
Great logic
Mam can We use this Solution? class Solution { public int searchInsert(int[] nums, int target) { for (int i = 0; i < nums.length; i++) { if (nums[i] >= target) { return i; } } return nums.length; } }
How long do freshers in this company generally take to start earning ₹1 lakh per month?
class Solution { public int[] twoSum(int[] nums, int target) { // int[] arr = {-1,-1}; // for(int i =0; i< nums.length; i++){ // for(int j =i+1; i< nums.length; i++){ // if(nums[i] + nums[j] == target){ // arr[0] = i; // arr[1] = j; // } // } // } O(n*n) HashMap<Integer, Integer> map = new HashMap<>(); for(int i =0; i< nums.length; i++){ int req = target-nums[i]; if(map.containsKey(req)){ int[] arr = {map.get(req) , i}; return arr; } map.put(nums[i], i); } return new int[]{-1, -1}; } }
🛠 Optimizations: ✅ HashSet instead of List → O(1) lookup instead of O(n) ✅ end - start instead of list.size() → Cleaner logic ✅ Space Complexity: O(n) (worst case, all unique characters) public static int lengthOfLongestSubstring(String string) { int start=0,end=0,max_length=0; Set<Character> set= new HashSet<>(); while(end<string.length()){ if(!set.contains(string.charAt(end))){ set.add(string.charAt(end)); end++; max_length=Math.max(max_length,end-start); }else{ set.remove(Character.valueOf(string.charAt(start))); start++; } } return max_length; }
Just love the way you explain...and logic hits the brain 🧠
Very clear and it's very easy to understand Thankyou mam❤
not run in all testcases just run on sample testcases
what if the array is like [1,2,3,4,5] for 1 & 2 count = 0, for 3 & 4 count = 0 and then for 5 vote is 1 and no other element remains to eliminate 5 and the method will return 5 as a candidate, which is wrong
didi aap kya type karri kons gbracket kidhar jara kuch jat nhi samaja
Tq so much buddy ❤
There is follow up in the question. Follow up: Could you solve it without loops/recursion?
This problem is my 50th leetcode problem.❤🎉
hi ma'm , just find out that this solution is not working for all the test case scenario where k>n, we can't directly put if condition as it will not perform our operation in such scenario where k>n . to deal with such test cases, i have used one more trick, which is k=k%n , after declaring n. and it solves the issue.
Straight to the point explanation.
class Solution { public String reverseWords(String s) { String[] word = s.trim().split(" +"); String res = ""; for(int i=word.length-1;i>=0;i--){ res = res + word[i] + " "; } return res.trim(); } }
It is not an optimal solution
Will not work for all the test cases
Doesn't work for String s="badc"; String t="baba"; Because the condition says two characters of s cannot map to the same character of t. I had to use two hashmaps to make it work.
thank you so much for your video. have been trying so many complicated things but it turned out i just needed to use pip3 instead of pip on my mac.
hash function
Amrita mam, why you are not uploading more tutorials, we love your teaching, please make java tutorials!!
your explanation is not quite right , class Solution { public int[] plusOne(int[] digits) { int n=digits.length; int[] nums={0}; for (int i=n-1;i>=0;i--){ if(digits[i]<9){ digits[i]++; return digits; } else{ digits[i]=0; } } if(digits[0]==0){ nums=new int[digits.length+1]; nums[0]=1; } return nums; } } I think this should be the adjustment (not only for 9 but 99,999 and so on it will work)
what about if the nos are 99, 999, ...?
This no longer works. Safari says: FTP URLs are disabled. :P
great explanation
wrong code it is not checking middel string
great explanation, after explaining the code and coded in ide do zoom out once and show the entire code so once again can trace out the logic 😊
thank you❤
do not do +1 in loop it can be make runtime error in test case like "aaa"
Thannnkk you <3
you'll be back?
Yeah..Will be back..preparing the content
@@TechnosageLearning mam can you please start Apna College OR Love babbar DSA sheet because most students are doinf it , and there is no one who has taught these questions in good manner you can do it very well
Thanks Amrita for solving it in an easy manner
I'm starting with DSA and your solutions are so well explained. Thank you maam!
Literally you are good but in some video you jst make it more complex.
Please complete this leetcode 150 series
not an optimized code ... 16ms runtime
int arr[]= {2,3,4,5,6,7}; this case it will fail above programme works only if array number starts with 1 for one missing number
plz start again this series
Very clear explanation with Exceptional case. Thanks!
thank you
Logic is not correct this js string reverse program not word...please change the title
For those who have doubt about all negative elements: eg. [-2, -3, -1]: max=-2 (as initialised at beginning) sum = 0 + (-2) = -2 (negative so reset to sum=0) | also sum= -2 is not greater than max= -2 . So don't update max. sum = 0 + (-3) = -3 (negative so reset to sum=0) | also sum= -3 is not greater than max= -2 . So don't update max. sum = 0 + (-1) = -1 Here, sum = -1 which is greater than max= -2. So update max = -1 So we get "max = -1" at the end of interaction which is true. Try yourself with longer arrays.
calm and nice explanation
You got one more student. Perfectly Explained..
Super
@Onesided.x isko check karo then, is it working? Leet code accept nahi kar raha , q ki is logic se dekhe to original array = ["dog","racecar","car"] sorting ke baad = [car, dog, racecar], to comparison first string aur last string main hua to answer car aayega as common prefix , but car dog main to nahi hai , fir? isliye leetcode main submit nahi ho raha .
racecar me car suffix he prefix nahi he
Very clear intuition..loved it...Thank u soo much 🫶
you should take the length of needle no???