Algorithms Time Complexity of Insertion Sort The average code and worst case time complexity of Insertion Sort is O(N^2) and the best case time complexity is O(N). The space complexity is O(N) for N elements.
Algorithms Number of substrings divisible by 8 but not 3 We need to find total number of substrings that are divisible by 8 but not 3 in the given string. We have solved this problem using Dynamic Programming in linear time O(N) where the brute force approach takes O(N^2) time.
Algorithms Minimum number of operations to make GCD of an array K We are given an array and we need to find the minimum number of operations required to make GCD of the array equal to k. Where an operation could be either increment or decrement an array element by 1. We have solved this in O(N log N) time complexity.
Algorithms Scheduling tasks to Minimize Lateness In this article, we have explored techniques to schedule tasks (with a deadline and time required to complete it) in a way to decrease the time lag in finish time and deadline of the chosen request (i.e., lateness).