Hello viewers,
Welcome to the KZread 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!!
Пікірлер
Its working for all cases 👍
Great explanation, but it would be great if you use dark theme on leetcode
3 is not minrightnums2 , 9 is
such a sweet and simple solution, thank q mam.
Can you please explain more at timestamp 4:45 that why did you just took the string till index 7?
Can you please explain more at timestamp 4:45 that why did you not take the whole length and just till index 7?
keep it up didiiiii ; U and SashCode channel doing great job ; i request u too pls come up with the series of daily leetcode potd solutionss
Thanks a lot mam!!!
it is best and simple than above class Solution { public void merge(int[] nums1, int m, int[] nums2, int n) { for (int j = 0, i = m; j < n; j++) { nums1[i] = nums2[j]; i++; } Arrays.sort(nums1); } }
great explanation simple approach for those in new in dsa
But it is not working on [5,1,3] array
class Solution { public int lengthOfLongestSubstring(String label) { int end = 0; int maxLength = 0; List<Character> list = new ArrayList<>(); while (end < label.length()) { boolean isContained = list.contains(label.charAt(end)); if (!isContained) { list.add(label.charAt(end)); end++; maxLength = Math.max(maxLength, list.size()); } else { list.removeFirst(); } } return maxLength; } } i think the start variable unnecessary
the indentation and the brackets opening and closing are not taken care of , and also this code is partially complete , this doesn't pass all test cases
Guys whoever is getting wrong ans, just check my solution it is accepted by leetcode: class Solution { public int[] searchRange(int[] nums, int target) { int[] result = new int[2]; result[0] = findFirstPosition(nums, target); result[1] = findLastPosition(nums, target); return result; } private int findFirstPosition(int[] nums, int target) { int left = 0; int right = nums.length - 1; int firstPosition = -1; while (left <= right) { int mid = left + (right - left) / 2; if (nums[mid] == target) { firstPosition = mid; right = mid - 1; // keep searching to the left } else if (nums[mid] < target) { left = mid + 1; } else { right = mid - 1; } } return firstPosition; } private int findLastPosition(int[] nums, int target) { int left = 0; int right = nums.length - 1; int lastPosition = -1; while (left <= right) { int mid = left + (right - left) / 2; if (nums[mid] == target) { lastPosition = mid; left = mid + 1; // keep searching to the right } else if (nums[mid] < target) { left = mid + 1; } else { right = mid - 1; } } return lastPosition; } }
public int[] searchRange(int[] nums, int target) { int[] arr = new int[2]; arr[0] = arr[1] = -1; for (int i = 0; i < nums.length; i++) { if (nums[i] == target) { arr[0] = i; break; } } if (arr[0] != -1) { for (int i = arr[0]; i < nums.length; i++) { if (nums[i] == target) { arr[1] = i; } else { break; } } } return arr; } For anyone facing issue try this solution
Please do continue with the series, In entire you tube this is the only channel where I am able to understand the solution and co-relate with my approach. I understand because of medical condition you took a break, but please try uploading the videos as soon as possible please Amrita it's my humble request. And if you are not well, Get well soon and then upload the videos.
Thank you for your message. We will be starting up with the videos soon.
Essentially this not in constant space. Because in the for loop, you are creating another copy for the array.
I just have a silly questions?? How much time the loop run ???
what if array=["Thik","kuchh nhi","Thik h"] as per your code output is => Thik but output will be "" (blank)
first sort the array, once it is sorted it will give correct output
maam what if there is two missing number then this code will be failed
Hello.. Thankyou for this video. Can you explain please why can't we use overflow condition like if (rev*10 > Integer.MAX_VALUE || rev*10 < Integer.MIN_VALUE)
regex kese kaam kr rha h maam @Technosage
legend
Tq😊
here's a single word 0ms code for it class Solution { public int strStr(String haystack, String needle) { return haystack.indexOf(needle); } }
thanks
Outstanding explanation in such a ez way <3 !
"Great explanation on removing duplicates from a sorted array! 𝑰 𝒓𝒆𝒄𝒆𝒏𝒕𝒍𝒚 𝒎𝒂𝒅𝒆 𝒂 𝒗𝒊𝒅𝒆𝒐 𝒐𝒏 𝒕𝒉𝒆 𝒔𝒂𝒎𝒆 𝒕𝒐𝒑𝒊𝒄 , exploring different approaches. It's always interesting to see how others tackle this problem."
PROBLEM SOLVED!
why visited = -1?
Good explanation.!!
great explanation mam..thank you so much
mam your code is left the last element always so return count is always less one here is the write code int pointer = 0; for (int i=0; i<nums.length-1; i++){ if (nums[i] != nums[i+1]){ nums[++pointer] = nums[i+1]; } } return nums.length ==0 ? 0 : pointer+1;
34:57 when you are in this screen is there a way to use vmware esxi gui on the same server? or it has to be managed yes or yes from that ip address in a browser?
NICE SUPER EXCELLENT MOTIVATED
you dint verified the case that majority element should be more the n/2 ????
NICE SUPER EXCELLENT MOTIVATED
amazing solution
Tnx, changing broadband speed options really worked well
Is there a way to automate it through CLI ?
You can use Python library pyvmomi. Or if you need CLI you can use ovftool offered by vmware.
why u have stop the series you may complete it all plzzzzzzzzzz
Hi Starting very soon..working on it..Please stay tuned
@@TechnosageLearning as soon as possible am waiting
class Solution { public int search(int[] nums, int target) { if(nums.length == 0 || nums == null){ return -1; } int n= nums.length; int i; for( i=0;i<n;i++){ if(nums[i] == target){ return i; } } return -1; } }
I'm working with a large dataset and the data is stored in json files. Json file Holds data,path is correct too,not parsing the data through any api still it gives the same error. Even i tried multiple ways. Why is this happening?
Thank you
Please share your code series of java
Why are you not solving in Leetcode , In Leetcode this code didn't pass all test cases
What if we give values like 1,2,3,3,3,3,5,6,6
very well explained!!
class Solution { public int search(int[] nums, int target) { for(int i=0; i<nums.length; i++){ if(nums[i]==target){ return i; } } return -1; } } this colde is also acceptable
bro it's time complexity is O(n) we have to do the question by O(log n)✌