Reverse a Number in Java.
Given a integer number, reverse it.
Lets see sample input and output for better understanding:
Reverse a number in Java input output example...
Home
»
Archives for May 2019
Find length of the longest valid parenthesis substring
in
Algorithm,
Datastructure,
Interviews,
Stack
- on 18:34:00
- No comments

Find length of the longest balanced parenthesis in a string.
Given a string consisting of opening and closing parenthesis, find the length of the longest balanced parenthesis in it.
Lets see sample input and output for better understanding:
longest...
Sort a Stack using Merge Sort
in
Algorithm,
Datastructure,
Interviews,
Sorting,
Stack
- on 20:38:00
- No comments

Sort a Stack using Merge Sort.
Lets see how to sort a stack using merge sort which uses divide and conquer recursive algorithm.
I recommend reading Merge sort first before proceeding.Also, check Merge sort article on linked list that will help in understanding...