Programming Tutorials
Programming Tutorials
  • 292
  • 3 020 980
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
Переглядів: 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

КОМЕНТАРІ

  • @Sailu2
    @Sailu2 4 дні тому

    Thanks sir!!!!

  • @user-vb1mb1tr7s
    @user-vb1mb1tr7s 11 днів тому

    what will happen if last element is duplicate element

  • @pratikshaonkar4273
    @pratikshaonkar4273 14 днів тому

    Kindly speak louder.

  • @user-pb1hz8oo1h
    @user-pb1hz8oo1h 17 днів тому

    you are awesome finally i understood after looking at 10 videos thank you

  • @sudeepgupta57
    @sudeepgupta57 18 днів тому

    Nice 🙂👍

  • @sufiyansalman2780
    @sufiyansalman2780 23 дні тому

    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.

  • @mmm2233
    @mmm2233 24 дні тому

    Why didnt you run the code ;(

  • @codewithyash8958
    @codewithyash8958 27 днів тому

    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); } }

  • @Cavalier7904
    @Cavalier7904 28 днів тому

    Nice explanation sir

  • @yogeshganpule2695
    @yogeshganpule2695 Місяць тому

    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 ; } }

  • @yogeshganpule2695
    @yogeshganpule2695 Місяць тому

    why to traverse till s.lenghth()-1 ; we can directly traverse till end of lenght

  • @vamsi_Krishna0_0
    @vamsi_Krishna0_0 Місяць тому

    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 + " "); } }

  • @start1learn-n171
    @start1learn-n171 Місяць тому

    Tq

  • @V.LaxmanaVyaas
    @V.LaxmanaVyaas Місяць тому

    Sir the output is in ordered one..not in unordered one sir

  • @MallikarjunGuggari-wc9ml
    @MallikarjunGuggari-wc9ml Місяць тому

    ur voice is too low

  • @manasnath7680
    @manasnath7680 Місяць тому

    Thanks, now I got a clear picture.

  • @NelsaNelsa-ke3uu
    @NelsaNelsa-ke3uu Місяць тому

    Great explanation

  • @NelsaNelsa-ke3uu
    @NelsaNelsa-ke3uu Місяць тому

    Thank you

  • @Hemavani-lx6zb
    @Hemavani-lx6zb 2 місяці тому

    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

  • @pakpukik
    @pakpukik 2 місяці тому

    Very nicely done

  • @shreyanjaysingh4270
    @shreyanjaysingh4270 2 місяці тому

    Thanks

  • @UpYourHand
    @UpYourHand 2 місяці тому

    Whoever is getting error just put this code at line no. 75 while(k>0){ st.pop(); k--; }

  • @Disha_Runwal
    @Disha_Runwal 2 місяці тому

    i m not getting how to return collections

  • @Disha_Runwal
    @Disha_Runwal 2 місяці тому

    plese tell how to return collections from method

  • @SahanasAllinOneChannel
    @SahanasAllinOneChannel 3 місяці тому

    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++; } }

  • @akshaypatil8940
    @akshaypatil8940 3 місяці тому

    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.

  • @amogu_07
    @amogu_07 3 місяці тому

    thanks bro!!

  • @curiossoul
    @curiossoul 3 місяці тому

    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; } }

  • @magdalenemercy8814
    @magdalenemercy8814 3 місяці тому

    Thank you!!

  • @karanamgiridharvenkatasrin8187
    @karanamgiridharvenkatasrin8187 3 місяці тому

    good sir

  • @1112sravani
    @1112sravani 3 місяці тому

    Great work. Thank you!!

  • @kingjoy7600
    @kingjoy7600 3 місяці тому

    🙌🙌🙌

  • @prathameshmali-mq6gx
    @prathameshmali-mq6gx 4 місяці тому

    you are good teacher and u selected good problems and not the fancy problems

  • @kunalchandra9682
    @kunalchandra9682 4 місяці тому

    brother you stammer too much.. please speak calmly..it make the understanding better..

  • @bodiabdo3107
    @bodiabdo3107 4 місяці тому

    Thanks❤

  • @buvaneswari8461
    @buvaneswari8461 4 місяці тому

    Thanks for this wonderful explanation sir

  • @vincent1552
    @vincent1552 4 місяці тому

    Best video 🎉

  • @chintan-xm9sk
    @chintan-xm9sk 4 місяці тому

    very good video but why we use binarysearchhelper method can you explain me ?

  • @abduchadili5691
    @abduchadili5691 5 місяців тому

    What if you have repeating pairs how would you code it ?

    • @sdetbyraviteja568
      @sdetbyraviteja568 4 місяці тому

      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.

  • @abduchadili5691
    @abduchadili5691 5 місяців тому

    you don't need if equal test, just use else which is the only case left

  • @saran.r7444
    @saran.r7444 5 місяців тому

    Simple & great explanation sir compared to others...

  • @chandana7277
    @chandana7277 5 місяців тому

    tqq sir

  • @TeluguAbbai802
    @TeluguAbbai802 5 місяців тому

    Good explanation. I just subscribed

  • @sonurajacrypto
    @sonurajacrypto 5 місяців тому

  • @mohanapriya4708
    @mohanapriya4708 5 місяців тому

    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); } } }

  • @user-xg8so6bh9l
    @user-xg8so6bh9l 5 місяців тому

    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.

  • @dhrubajyotighosh4646
    @dhrubajyotighosh4646 6 місяців тому

    Sir why in my program the count of array elements start from 1, why not 0??

  • @StrangeDooropen
    @StrangeDooropen 6 місяців тому

    Literally the best explanation thank you sir !

  • @siddhigolatkar8558
    @siddhigolatkar8558 7 місяців тому

    Thank you

  • @parzival81089
    @parzival81089 7 місяців тому

    The hardest part he skipped