Browse our collection of articles on various topics related to IT technologies. Dive in and explore something new!
This is an interesting and challenging problem inspired by real life. (but not all) ...
Problem TC: O(nlogn) class Solution { // Function to find the minimum number of platforms...
Introduction In the realm of data compression, the Huffman Encoding algorithm stands as...
Problem TC: O(n)O(n) O(n) SC: O(n)O(n) O(n) class Solution { public int...
Problem class Solution { public int eraseOverlapIntervals(int[][] intervals) { //same...
Problem /* TC: O(n), outer loop is just for checking if r<n-1, inner loop is doing...
Problem TC: O(nlogn) //greedily try to add char one by one, in the final string, don't try and...
Problem class Solution { public int findMinArrowShots(int[][] points) { //remove all...
Merge Intervals Tc : O(nlogn) for sorting the intervals based on start time + O(n) for...
Problem Tc : O(nlogn) for sorting the intervals array + O(25) for other iterations Sc :O(n) for...
Problem class Solution { // sort on the basis of profit in descending order and try to execute...
Problem Tc : O(nlogn) for sorting the list + O(n) for traversal of the list Sc: O(n) for using the...