Programming Tutorials
Programming Tutorials
  • 292
  • 3 023 223
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 - czcams.com/play/PLUg9hRlm7gxTVeS1a6KnB6Rqu60rFAfbP.html
LeetCode Solutions Java Code - czcams.com/play/PLUg9hRlm7gxTnuZRAgREGc-mpI17kAh3E.html
Linked List Interview Questions - czcams.com/play/PLUg9hRlm7gxRuFUrLDnE8Wzji29EppBUx.html
Binary Tree Interview Questions - czcams.com/play/PLUg9hRlm7gxTVeS1a6KnB6Rqu60rFAfbP.html
Stack Interview Questions - czcams.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 - czcams.com/channels/uix1GOcmoqqWcHh1W1dWAg.htmljoin
zhlédnutí: 942

Video

Singleton Design Pattern | Java | Multiple Examples
zhlédnutí 744Před rokem
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 - czcams.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
zhlédnutí 3,3KPřed rokem
In this tutorial, I have explained multiple approaches to solve triplet sum in array with their code. Find Triplets with Zero Sum - czcams.com/video/cFd4-Dz8l4g/video.html LeetCode Solutions Java Code - czcams.com/play/PLUg9hRlm7gxTnuZRAgREGc-mpI17kAh3E.html Linked List Interview Questions - czcams.com/play/PLUg9hRlm7gxRuFUrLDnE8Wzji29EppBUx.html Binary Tree Interview Questions - czcams.com/pla...
How to Create Immutable Class in Java | Immutable Classes & Objects
zhlédnutí 1,1KPřed rokem
In this tutorial, i have explained how to create immutable class in java with mutable object. Wrapper classes in java - czcams.com/video/aOavcZZcz0s/video.html Java interview questions - czcams.com/play/PLUg9hRlm7gxRIZ0yAl_MoxxDySbH67SnY.html LeetCode Solutions Java Code - czcams.com/play/PLUg9hRlm7gxTnuZRAgREGc-mpI17kAh3E.html Linked List Interview Questions - czcams.com/play/PLUg9hRlm7gxRuFUr...
Monotonic Array | Check If Given Array is Monotonic | Programming Tutorials
zhlédnutí 1,1KPřed rokem
In this tutorial, I have explained monotonic array solution with multiple approaches and its code. Monotonic array java code. LeetCode Solutions Java Code - czcams.com/play/PLUg9hRlm7gxTnuZRAgREGc-mpI17kAh3E.html Linked List Interview Questions - czcams.com/play/PLUg9hRlm7gxRuFUrLDnE8Wzji29EppBUx.html Binary Tree Interview Questions - czcams.com/play/PLUg9hRlm7gxTVeS1a6KnB6Rqu60rFAfbP.html Stac...
Sliding Window Maximum | LeetCode | Priority Queue | Deque | Java Code
zhlédnutí 1,3KPřed rokem
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 - czcams.com/video/q_pW6VwNkpU/video.html LeetCode Solutions Java Code - czcams.com/play/PLUg9hRlm7gxTnuZRAgREGc-mpI17kAh3E.html Linked List Interview Questions - czcam...
Primitive Vs Reference Data Type | Difference between Primitive and Non-Primitive Data Types in Java
zhlédnutí 2,3KPřed rokem
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 - czcams.com/play/PLUg9hRlm7gxTnuZRAgREGc-mpI17kAh3E.html Linked List Interview Questions - czcams.com/play/PLUg9hRlm7gxRuFUrLDnE8Wzji29EppBUx.html Binary Tree Interview Ques...
Interface Segregation Principle | SOLID Principles | Java Code
zhlédnutí 731Před rokem
In this tutorial, I have explained interface segregation principle of solid design principles using multiple examples. SOLID design principles (Playlist) - czcams.com/play/PLUg9hRlm7gxTX5b_CYoTsNTI9h5IJU3XG.html LeetCode Solutions Java Code - czcams.com/play/PLUg9hRlm7gxTnuZRAgREGc-mpI17kAh3E.html Linked List Interview Questions - czcams.com/play/PLUg9hRlm7gxRuFUrLDnE8Wzji29EppBUx.html Binary T...
Shortest Unsorted Continuous Subarray | Java Code | Programming Tutorials
zhlédnutí 560Před rokem
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 - czcams.com/play/PLUg9hRlm7gxTnuZRAgREGc-mpI17kAh3E.html Linked List Interview Questions - czcams.com/play/PLUg9hRlm7gxRuFUrLDnE8Wzji29EppBUx.html Binary Tree Interview Questio...
Liskov Substitution Principle | SOLID Principles | Multiple Code Examples
zhlédnutí 614Před rokem
In this tutorial, I have explained Liskov substitution principle with multiple code examples and their java code. SOLID Design Principles - czcams.com/play/PLUg9hRlm7gxTX5b_CYoTsNTI9h5IJU3XG.html LeetCode Solutions Java Code - czcams.com/play/PLUg9hRlm7gxTnuZRAgREGc-mpI17kAh3E.html Linked List Interview Questions - czcams.com/play/PLUg9hRlm7gxRuFUrLDnE8Wzji29EppBUx.html Binary Tree Interview Qu...
Remove Duplicates from Sorted Array In-Place (without using extra space)
zhlédnutí 2,6KPřed rokem
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 - czcams.com/play/PLUg9hRlm7gxTnuZRAgREGc-mpI17kAh3E.html Linked List Interview Questions - czcams.com/play/PLUg9hRlm7gxRuFUrLDnE8Wzji29EppBUx.html Binary Tree Interview Questions - czcams.com/play/PLUg9hRlm7gxTVeS1a6KnB6Rqu60rFAfbP...
Squares of a Sorted Array | Sort Array After Converting Elements to their Squares
zhlédnutí 1,1KPřed rokem
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 - czcams.com/play/PLUg9hRlm7...
Cyclically Rotate an Array by One | Right Rotate an Array by One Index | Java
zhlédnutí 825Před rokem
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 - czcams.com/video/iCzPkkpakd0/video.html Coding Interview Books - Cracking the coding interview - amzn.to/3h70jXy Data structure and algorithms made easy - amzn.to/3jgMl7U LeetCode Solutions Java Code - czcams.com/play/PLUg9hRlm7gxTnuZRAgR...
Wrapper Classes in Java | Primitive Data Types | Autoboxing and Unboxing - Java Code
zhlédnutí 904Před rokem
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 - czcams.com/play/PLUg9hRlm7gxTnuZRAgREGc-mpI17kAh3E.html Linked List Interview Questions - czcams.co...
Open Closed Principle | Code Example | SOLID Principles
zhlédnutí 753Před rokem
In this tutorial, i have explained open closed principle of SOLID Principles with java code. Single responsibility principle - czcams.com/video/ji4VNtbi_70/video.html Head first design patterns - amzn.to/3nJhH8t Clean code - amzn.to/3NQaein LeetCode Solutions Java Code - czcams.com/play/PLUg9hRlm7gxTnuZRAgREGc-mpI17kAh3E.html Linked List Interview Questions - czcams.com/play/PLUg9hRlm7gxRuFUrLD...
Comparable vs Comparator | Java Interview Questions
zhlédnutí 713Před rokem
Comparable vs Comparator | Java Interview Questions
Insert Interval | Insert in sorted and non-overlapping interval array | Programming Tutorials
zhlédnutí 594Před 2 lety
Insert Interval | Insert in sorted and non-overlapping interval array | Programming Tutorials
Single Responsibility Principle | SOLID Principles
zhlédnutí 638Před 2 lety
Single Responsibility Principle | SOLID Principles
Horizontal vs Vertical Scaling | System Design | Programming Tutorials
zhlédnutí 380Před 2 lety
Horizontal vs Vertical Scaling | System Design | Programming Tutorials
Longest Substring with K Unique Characters | Programming Tutorials
zhlédnutí 1,8KPřed 2 lety
Longest Substring with K Unique Characters | Programming Tutorials
Longest Substring with At Most K Distinct Characters | Programming Tutorials
zhlédnutí 996Před 2 lety
Longest Substring with At Most K Distinct Characters | Programming Tutorials
Java Deque | Deque Interface in Java with Example | ArrayDeque
zhlédnutí 11KPřed 2 lety
Java Deque | Deque Interface in Java with Example | ArrayDeque
Doubly Linked List | Singly Vs Doubly Linked List | Time Complexity
zhlédnutí 1,6KPřed 2 lety
Doubly Linked List | Singly Vs Doubly Linked List | Time Complexity
A peaceful evening away from the busy life
zhlédnutí 346Před 2 lety
A peaceful evening away from the busy life
Smallest Subarray with Sum Greater than or Equal to K (Target) | Sliding Window
zhlédnutí 3,1KPřed 2 lety
Smallest Subarray with Sum Greater than or Equal to K (Target) | Sliding Window
Implement Queue using Two Stacks | Java | Programming Tutorials
zhlédnutí 1,5KPřed 2 lety
Implement Queue using Two Stacks | Java | Programming Tutorials
Next Greater Element in Circular Array | Next Greater Element II | Programming Tutorials
zhlédnutí 3,2KPřed 3 lety
Next Greater Element in Circular Array | Next Greater Element II | Programming Tutorials
Thank you for 10K subscribers !!! | Programming Tutorials
zhlédnutí 236Před 3 lety
Thank you for 10K subscribers !!! | Programming Tutorials
Binary Tree Inorder Traversal with and without Recursion | LeetCode 94 | Programming Tutorials
zhlédnutí 1,5KPřed 3 lety
Binary Tree Inorder Traversal with and without Recursion | LeetCode 94 | Programming Tutorials
Rotting Oranges | Minimum Time Required to Rot All Oranges | Java | Programming Tutorials
zhlédnutí 1,5KPřed 3 lety
Rotting Oranges | Minimum Time Required to Rot All Oranges | Java | Programming Tutorials

Komentáře

  • @HarshKumar-zl9fx
    @HarshKumar-zl9fx Před 18 hodinami

    int numIslands(vector<vector<char>>& grid) { int n = grid.size(); int m = grid[0].size(); int dire[4][2]={{1,0},{0,1},{-1,0},{0,-1}}; queue<pair<int,int>>q; int count=0; for(int row = 0;row<n;row++) { for(int col = 0;col<m;col++) { if(grid[row][col]=='1') { count++; q.push({row,col}); grid[row][col]='2'; } while(!q.empty()) { auto x = q.front(); q.pop(); for(auto i : dire) { int r=i[0]+x.first; int c=i[1]+x.second; if(r>=0 && r<n && c>=0 && c<m && grid[r][c]=='1') { q.push({r,c}); grid[r][c]='2'; } } } } } return count; } c++ solution

  • @Sailu2
    @Sailu2 Před 7 dny

    Thanks sir!!!!

  • @user-vb1mb1tr7s
    @user-vb1mb1tr7s Před 13 dny

    what will happen if last element is duplicate element

  • @pratikshaonkar4273
    @pratikshaonkar4273 Před 16 dny

    Kindly speak louder.

  • @user-pb1hz8oo1h
    @user-pb1hz8oo1h Před 20 dny

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

  • @sudeepgupta57
    @sudeepgupta57 Před 21 dnem

    Nice 🙂👍

  • @sufiyansalman2780
    @sufiyansalman2780 Před 25 dny

    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 Před 26 dny

    Why didnt you run the code ;(

  • @codewithyash8958
    @codewithyash8958 Před 29 dny

    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 Před měsícem

    Nice explanation sir

  • @yogeshganpule2695
    @yogeshganpule2695 Před měsícem

    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 Před měsícem

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

  • @vamsi_Krishna0_0
    @vamsi_Krishna0_0 Před měsícem

    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 Před měsícem

    Tq

  • @V.LaxmanaVyaas
    @V.LaxmanaVyaas Před měsícem

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

  • @MallikarjunGuggari-wc9ml
    @MallikarjunGuggari-wc9ml Před měsícem

    ur voice is too low

  • @manasnath7680
    @manasnath7680 Před měsícem

    Thanks, now I got a clear picture.

  • @NelsaNelsa-ke3uu
    @NelsaNelsa-ke3uu Před měsícem

    Great explanation

  • @NelsaNelsa-ke3uu
    @NelsaNelsa-ke3uu Před měsícem

    Thank you

  • @Hemavani-lx6zb
    @Hemavani-lx6zb Před 2 měsíci

    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 Před 2 měsíci

    Very nicely done

  • @shreyanjaysingh4270
    @shreyanjaysingh4270 Před 2 měsíci

    Thanks

  • @UpYourHand
    @UpYourHand Před 3 měsíci

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

  • @Disha_Runwal
    @Disha_Runwal Před 3 měsíci

    i m not getting how to return collections

  • @Disha_Runwal
    @Disha_Runwal Před 3 měsíci

    plese tell how to return collections from method

  • @SahanasAllinOneChannel
    @SahanasAllinOneChannel Před 3 měsíci

    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 Před 3 měsíci

    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 Před 3 měsíci

    thanks bro!!

  • @curiossoul
    @curiossoul Před 3 měsíci

    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 Před 4 měsíci

    Thank you!!

  • @karanamgiridharvenkatasrin8187

    good sir

  • @1112sravani
    @1112sravani Před 4 měsíci

    Great work. Thank you!!

  • @kingjoy7600
    @kingjoy7600 Před 4 měsíci

    🙌🙌🙌

  • @prathameshmali-mq6gx
    @prathameshmali-mq6gx Před 4 měsíci

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

  • @kunalchandra9682
    @kunalchandra9682 Před 4 měsíci

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

  • @bodiabdo3107
    @bodiabdo3107 Před 4 měsíci

    Thanks❤

  • @buvaneswari8461
    @buvaneswari8461 Před 4 měsíci

    Thanks for this wonderful explanation sir

  • @vincent1552
    @vincent1552 Před 5 měsíci

    Best video 🎉

  • @chintan-xm9sk
    @chintan-xm9sk Před 5 měsíci

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

  • @abduchadili5691
    @abduchadili5691 Před 5 měsíci

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

    • @sdetbyraviteja568
      @sdetbyraviteja568 Před 4 měsíci

      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 Před 5 měsíci

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

  • @saran.r7444
    @saran.r7444 Před 5 měsíci

    Simple & great explanation sir compared to others...

  • @chandana7277
    @chandana7277 Před 5 měsíci

    tqq sir

  • @TeluguAbbai802
    @TeluguAbbai802 Před 5 měsíci

    Good explanation. I just subscribed

  • @sonurajacrypto
    @sonurajacrypto Před 5 měsíci

  • @mohanapriya4708
    @mohanapriya4708 Před 5 měsíci

    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 Před 5 měsíci

    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 Před 6 měsíci

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

  • @StrangeDooropen
    @StrangeDooropen Před 6 měsíci

    Literally the best explanation thank you sir !

  • @siddhigolatkar8558
    @siddhigolatkar8558 Před 7 měsíci

    Thank you