![Programming Tutorials](/img/default-banner.jpg)
- 292
- 3 020 980
Programming Tutorials
India
Приєднався 6 жов 2011
In this channel, I discuss tutorials related to programming, data structure and java.
You can contact me through this form - webrewrite.com/contact-us/
You can contact me through this form - webrewrite.com/contact-us/
Symmetric Tree (Mirror Image of itself or not) | Iterative & Recursive Solution
In this tutorial, I have explained symmetric tree (mirror image of itself or not) solution using iterative and recursive approach and it's java code.
Binary Tree Playlist - ua-cam.com/play/PLUg9hRlm7gxTVeS1a6KnB6Rqu60rFAfbP.html
LeetCode Solutions Java Code - ua-cam.com/play/PLUg9hRlm7gxTnuZRAgREGc-mpI17kAh3E.html
Linked List Interview Questions - ua-cam.com/play/PLUg9hRlm7gxRuFUrLDnE8Wzji29EppBUx.html
Binary Tree Interview Questions - ua-cam.com/play/PLUg9hRlm7gxTVeS1a6KnB6Rqu60rFAfbP.html
Stack Interview Questions - ua-cam.com/play/PLUg9hRlm7gxRgJgBhgp5uc05HFO0VIjdR.html
Coding Interview Books -
Cracking the coding interview - amzn.to/3h70jXy
Data structure and algorithms made easy - amzn.to/3jgMl7U
Contact Me through this Form - webrewrite.com/contact-us/
Website - webrewrite.com/
Join Membership - ua-cam.com/channels/uix1GOcmoqqWcHh1W1dWAg.htmljoin
Binary Tree Playlist - ua-cam.com/play/PLUg9hRlm7gxTVeS1a6KnB6Rqu60rFAfbP.html
LeetCode Solutions Java Code - ua-cam.com/play/PLUg9hRlm7gxTnuZRAgREGc-mpI17kAh3E.html
Linked List Interview Questions - ua-cam.com/play/PLUg9hRlm7gxRuFUrLDnE8Wzji29EppBUx.html
Binary Tree Interview Questions - ua-cam.com/play/PLUg9hRlm7gxTVeS1a6KnB6Rqu60rFAfbP.html
Stack Interview Questions - ua-cam.com/play/PLUg9hRlm7gxRgJgBhgp5uc05HFO0VIjdR.html
Coding Interview Books -
Cracking the coding interview - amzn.to/3h70jXy
Data structure and algorithms made easy - amzn.to/3jgMl7U
Contact Me through this Form - webrewrite.com/contact-us/
Website - webrewrite.com/
Join Membership - ua-cam.com/channels/uix1GOcmoqqWcHh1W1dWAg.htmljoin
Переглядів: 940
Відео
Singleton Design Pattern | Java | Multiple Examples
Переглядів 742Рік тому
In this tutorial, I have explained singleton design pattern in java with multiple examples. This tutorial explained multi-threading aspect using double checking lock, Synchronization keyword and eager initialization. SOLID Design Patterns - ua-cam.com/play/PLUg9hRlm7gxTX5b_CYoTsNTI9h5IJU3XG.html Singleton design pattern eager initialization Singleton design pattern lazy initialization LeetCode ...
Triplet Sum in Array | Find a Triplet with the Given Sum in an Array | Programming Tutorials
Переглядів 3,2 тис.Рік тому
In this tutorial, I have explained multiple approaches to solve triplet sum in array with their code. Find Triplets with Zero Sum - ua-cam.com/video/cFd4-Dz8l4g/v-deo.html LeetCode Solutions Java Code - ua-cam.com/play/PLUg9hRlm7gxTnuZRAgREGc-mpI17kAh3E.html Linked List Interview Questions - ua-cam.com/play/PLUg9hRlm7gxRuFUrLDnE8Wzji29EppBUx.html Binary Tree Interview Questions - ua-cam.com/pla...
How to Create Immutable Class in Java | Immutable Classes & Objects
Переглядів 1,1 тис.Рік тому
In this tutorial, i have explained how to create immutable class in java with mutable object. Wrapper classes in java - ua-cam.com/video/aOavcZZcz0s/v-deo.html Java interview questions - ua-cam.com/play/PLUg9hRlm7gxRIZ0yAl_MoxxDySbH67SnY.html LeetCode Solutions Java Code - ua-cam.com/play/PLUg9hRlm7gxTnuZRAgREGc-mpI17kAh3E.html Linked List Interview Questions - ua-cam.com/play/PLUg9hRlm7gxRuFUr...
Monotonic Array | Check If Given Array is Monotonic | Programming Tutorials
Переглядів 1 тис.Рік тому
In this tutorial, I have explained monotonic array solution with multiple approaches and its code. Monotonic array java code. LeetCode Solutions Java Code - ua-cam.com/play/PLUg9hRlm7gxTnuZRAgREGc-mpI17kAh3E.html Linked List Interview Questions - ua-cam.com/play/PLUg9hRlm7gxRuFUrLDnE8Wzji29EppBUx.html Binary Tree Interview Questions - ua-cam.com/play/PLUg9hRlm7gxTVeS1a6KnB6Rqu60rFAfbP.html Stac...
Sliding Window Maximum | LeetCode | Priority Queue | Deque | Java Code
Переглядів 1,3 тис.Рік тому
In this tutorial, i have explained sliding window maximum leetcode solution and it's java code using three approaches. Sliding window maximum solution using deque. Sliding window maximum solution using priority queue. Java deque - ua-cam.com/video/q_pW6VwNkpU/v-deo.html LeetCode Solutions Java Code - ua-cam.com/play/PLUg9hRlm7gxTnuZRAgREGc-mpI17kAh3E.html Linked List Interview Questions - ua-ca...
Primitive Vs Reference Data Type | Difference between Primitive and Non-Primitive Data Types in Java
Переглядів 2,3 тис.Рік тому
In this tutorial, I have explained the difference between primitive and non-primitive (reference) data types in java and their memory handling in java. Primitive Vs Reference Data Types in Java LeetCode Solutions Java Code - ua-cam.com/play/PLUg9hRlm7gxTnuZRAgREGc-mpI17kAh3E.html Linked List Interview Questions - ua-cam.com/play/PLUg9hRlm7gxRuFUrLDnE8Wzji29EppBUx.html Binary Tree Interview Ques...
Interface Segregation Principle | SOLID Principles | Java Code
Переглядів 729Рік тому
In this tutorial, I have explained interface segregation principle of solid design principles using multiple examples. SOLID design principles (Playlist) - ua-cam.com/play/PLUg9hRlm7gxTX5b_CYoTsNTI9h5IJU3XG.html LeetCode Solutions Java Code - ua-cam.com/play/PLUg9hRlm7gxTnuZRAgREGc-mpI17kAh3E.html Linked List Interview Questions - ua-cam.com/play/PLUg9hRlm7gxRuFUrLDnE8Wzji29EppBUx.html Binary T...
Shortest Unsorted Continuous Subarray | Java Code | Programming Tutorials
Переглядів 559Рік тому
In this this tutorial, i have explained shortest unsorted continuous subarray problem and it's code. Find the minimum length unsorted subarray, sorting which makes the complete array sorted. LeetCode Solutions Java Code - ua-cam.com/play/PLUg9hRlm7gxTnuZRAgREGc-mpI17kAh3E.html Linked List Interview Questions - ua-cam.com/play/PLUg9hRlm7gxRuFUrLDnE8Wzji29EppBUx.html Binary Tree Interview Questio...
Liskov Substitution Principle | SOLID Principles | Multiple Code Examples
Переглядів 610Рік тому
In this tutorial, I have explained Liskov substitution principle with multiple code examples and their java code. SOLID Design Principles - ua-cam.com/play/PLUg9hRlm7gxTX5b_CYoTsNTI9h5IJU3XG.html LeetCode Solutions Java Code - ua-cam.com/play/PLUg9hRlm7gxTnuZRAgREGc-mpI17kAh3E.html Linked List Interview Questions - ua-cam.com/play/PLUg9hRlm7gxRuFUrLDnE8Wzji29EppBUx.html Binary Tree Interview Qu...
Remove Duplicates from Sorted Array In-Place (without using extra space)
Переглядів 2,6 тис.Рік тому
In this tutorial, I have explained an approach to remove duplicates from sorted array without using any extra space and it's java code. LeetCode Solutions Java Code - ua-cam.com/play/PLUg9hRlm7gxTnuZRAgREGc-mpI17kAh3E.html Linked List Interview Questions - ua-cam.com/play/PLUg9hRlm7gxRuFUrLDnE8Wzji29EppBUx.html Binary Tree Interview Questions - ua-cam.com/play/PLUg9hRlm7gxTVeS1a6KnB6Rqu60rFAfbP...
Squares of a Sorted Array | Sort Array After Converting Elements to their Squares
Переглядів 1,1 тис.Рік тому
In this tutorial, I have explained three approaches to solve squares of a sorted array with their code. Sort Array After Converting Elements to their Squares. Squares of a sorted array leetcode solution Java. Coding Interview Books - Cracking the coding interview - amzn.to/3h70jXy Data structure and algorithms made easy - amzn.to/3jgMl7U LeetCode Solutions Java Code - ua-cam.com/play/PLUg9hRlm7...
Cyclically Rotate an Array by One | Right Rotate an Array by One Index | Java
Переглядів 820Рік тому
In this tutorial, i have explained how to cyclically rotate an array by one or in other words right rotate an array by one index. Rotate an Array by K Steps - ua-cam.com/video/iCzPkkpakd0/v-deo.html Coding Interview Books - Cracking the coding interview - amzn.to/3h70jXy Data structure and algorithms made easy - amzn.to/3jgMl7U LeetCode Solutions Java Code - ua-cam.com/play/PLUg9hRlm7gxTnuZRAgR...
Wrapper Classes in Java | Primitive Data Types | Autoboxing and Unboxing - Java Code
Переглядів 902Рік тому
In this tutorial, i have explained what is wrapper classes in java and the concepts of autoboxing and unboxing with java code. Wrapper classes in java. Primitive data types in java. Autoboxing and unboxing in java with code example. Head first java - amzn.to/3JfDEWF LeetCode Solutions Java Code - ua-cam.com/play/PLUg9hRlm7gxTnuZRAgREGc-mpI17kAh3E.html Linked List Interview Questions - ua-cam.co...
Open Closed Principle | Code Example | SOLID Principles
Переглядів 752Рік тому
In this tutorial, i have explained open closed principle of SOLID Principles with java code. Single responsibility principle - ua-cam.com/video/ji4VNtbi_70/v-deo.html Head first design patterns - amzn.to/3nJhH8t Clean code - amzn.to/3NQaein LeetCode Solutions Java Code - ua-cam.com/play/PLUg9hRlm7gxTnuZRAgREGc-mpI17kAh3E.html Linked List Interview Questions - ua-cam.com/play/PLUg9hRlm7gxRuFUrLD...
Comparable vs Comparator | Java Interview Questions
Переглядів 712Рік тому
Comparable vs Comparator | Java Interview Questions
Insert Interval | Insert in sorted and non-overlapping interval array | Programming Tutorials
Переглядів 592Рік тому
Insert Interval | Insert in sorted and non-overlapping interval array | Programming Tutorials
Single Responsibility Principle | SOLID Principles
Переглядів 638Рік тому
Single Responsibility Principle | SOLID Principles
Horizontal vs Vertical Scaling | System Design | Programming Tutorials
Переглядів 3802 роки тому
Horizontal vs Vertical Scaling | System Design | Programming Tutorials
Longest Substring with K Unique Characters | Programming Tutorials
Переглядів 1,8 тис.2 роки тому
Longest Substring with K Unique Characters | Programming Tutorials
Longest Substring with At Most K Distinct Characters | Programming Tutorials
Переглядів 9962 роки тому
Longest Substring with At Most K Distinct Characters | Programming Tutorials
Java Deque | Deque Interface in Java with Example | ArrayDeque
Переглядів 11 тис.2 роки тому
Java Deque | Deque Interface in Java with Example | ArrayDeque
Doubly Linked List | Singly Vs Doubly Linked List | Time Complexity
Переглядів 1,6 тис.2 роки тому
Doubly Linked List | Singly Vs Doubly Linked List | Time Complexity
A peaceful evening away from the busy life
Переглядів 3462 роки тому
A peaceful evening away from the busy life
Smallest Subarray with Sum Greater than or Equal to K (Target) | Sliding Window
Переглядів 3,1 тис.2 роки тому
Smallest Subarray with Sum Greater than or Equal to K (Target) | Sliding Window
Implement Queue using Two Stacks | Java | Programming Tutorials
Переглядів 1,5 тис.2 роки тому
Implement Queue using Two Stacks | Java | Programming Tutorials
Next Greater Element in Circular Array | Next Greater Element II | Programming Tutorials
Переглядів 3,2 тис.3 роки тому
Next Greater Element in Circular Array | Next Greater Element II | Programming Tutorials
Thank you for 10K subscribers !!! | Programming Tutorials
Переглядів 2363 роки тому
Thank you for 10K subscribers !!! | Programming Tutorials
Binary Tree Inorder Traversal with and without Recursion | LeetCode 94 | Programming Tutorials
Переглядів 1,5 тис.3 роки тому
Binary Tree Inorder Traversal with and without Recursion | LeetCode 94 | Programming Tutorials
Rotting Oranges | Minimum Time Required to Rot All Oranges | Java | Programming Tutorials
Переглядів 1,5 тис.3 роки тому
Rotting Oranges | Minimum Time Required to Rot All Oranges | Java | Programming Tutorials
Thanks sir!!!!
what will happen if last element is duplicate element
Kindly speak louder.
you are awesome finally i understood after looking at 10 videos thank you
Nice 🙂👍
What if the problem states that at most we can delete 2 characters and the deletion should happen from left to right. For example, s = "abjchba". Now to make it palindrome, we can either delete "jc" or "ch". But as per problem, we should be deleting "jc" and correct palindrome would be "abhba". We have to return the characters that we deleted.
Why didnt you run the code ;(
class Main {public static void main(String[] args) { int a [] = {1,2,2,3,4,3,4,5}; Set<Integer> var1=new HashSet<>(); for(int i: a) { var1.add(i); } System.out.println(var1); } }
Nice explanation sir
why is my code aint working class Solution { public int romanToInt(String s) { Map <Character , Integer> map = new HashMap<>(); map.put('I',1); map.put('V',5); map.put('X',10); map.put('L',50); map.put('C',100); map.put('D',500); map.put('M',1000); int result = 0; for (int i=0 ; i<s.length()-1; i++){ if (map.get(s.charAt(i)) >= map.get(s.charAt(i+1))){ result = (map.get(s.charAt(i)) + map.get(s.charAt(i+1))); } else if (map.get(s.charAt(i)) <= map.get(s.charAt(i+1))){ result = (map.get(s.charAt(i+1)) - map.get(s.charAt(i))); } } return result ; } }
why to traverse till s.lenghth()-1 ; we can directly traverse till end of lenght
Instead of a temp array use ArrayList you won't get zeros. public static void main(String[] args) { int a[] = { 1, 1, 2, 2, 3, 3, 4, 5, 6 }; int len = a.length; int j = 0; ArrayList<Integer> arr = new ArrayList<Integer>(); for (int i = 0; i < len - 1; i++) { if (a[i] != a[i + 1]) { arr.add(j++, a[i]); } } arr.add(j++, a[len - 1]); for (int i : arr) { System.out.print(i + " "); } }
Tq
Sir the output is in ordered one..not in unordered one sir
ur voice is too low
Thanks, now I got a clear picture.
Great explanation
Thank you
awesome explanation, need program for : Write a java program for getting the sum of 30 by adding min 3 numbers from count[]={1, 15, 10, 5}. pleas help
Very nicely done
Thanks
Welcome
Whoever is getting error just put this code at line no. 75 while(k>0){ st.pop(); k--; }
i m not getting how to return collections
plese tell how to return collections from method
int j = 0; for (int i = 0; i < arr.length; i++) { if (arr[i] != 0) { if (i != j) { int temp = arr[i]; arr[i] = arr[j]; arr[j] = temp; } j++; } }
What if in 2nd 60s position there is 65. Does it fail ?. According to algorithm it is coming as 1 while its answer should be 2.
thanks bro!!
public double myPow(double x, int n) { double res = pow(x, Math.abs(n)); if(n<0) return 1/res; return res; } double pow(double x, int n){ if(n==0) return 1; double temp = pow(x, n/2); if(n%2==0) return temp*temp; else { return temp*temp*x; } }
Thank you!!
Thanks
good sir
Great work. Thank you!!
Thank you
🙌🙌🙌
Thanks
you are good teacher and u selected good problems and not the fancy problems
brother you stammer too much.. please speak calmly..it make the understanding better..
Thanks❤
Thanks for this wonderful explanation sir
Thank you
Best video 🎉
Thanks
very good video but why we use binarysearchhelper method can you explain me ?
What if you have repeating pairs how would you code it ?
For that again we have to create one hash set and by using if condition by putting distinct pairs we can person the sum operation.
you don't need if equal test, just use else which is the only case left
Simple & great explanation sir compared to others...
Thanks and welcome
tqq sir
Good explanation. I just subscribed
Thanks and welcome
❤
Can you help me with this? I gave 453 as the number in o/p Each time it is saying The digit count in the given number is:1 The digit count in the given number is:2 The digit count in the given number is:3 it is not coming in single line as The digit count in the given number is:3 My program: import java.util.Scanner; public class digits{ public static void main(String args[]){ System.out.print("Enter the number: "); Scanner scan=new Scanner(System.in); int num=scan.nextInt(); int digit_count=0; while(num>0){ num=num/10; digit_count++; System.out.println("The digit count in the given number is: "+digit_count); } } }
HI I need this probem fixed in java 8 .Could you please help me for this probem Given array : 1,3,5,7,9,11,16,20 Input value : 16 Output [2,5][3,4] Write the logic to identify the pairs of index in given array which value sum equal to input value.I have pasted here the problem statement I need solution by using java 8 concepts.
Sir why in my program the count of array elements start from 1, why not 0??
Literally the best explanation thank you sir !
Thank you
Thank you
Thank you
The hardest part he skipped