## Python Program to Solve Maximum Subarray Problem using Kadane’s Algorithm

This is a Python program to solve the maximum subarray problem using Kadane’s algorithm. Problem Description The program finds a subarray that has the maximum sum within the given array. Problem Solution 1. Define the function find_max_subarray that takes a list as argument and two indexes, start and end. It finds the maximum subarray in … Read more

## Python Program to Solve Maximum Subarray Problem using Divide and Conquer

This is a Python program to solve the maximum subarray problem using divide and conquer technique. Problem Description The program finds a subarray that has the maximum sum within the given array. Problem Solution 1. Define the function find_max_subarray that takes a list as argument and two indexes, start and end. It finds the maximum … Read more

## Python Program to Find ith Largest Element from List in Linear Time

This is a Python program to select the ith largest element from a list in expected linear time. Problem Description The program takes a list and i as input and prints the ith largest element in the list. Problem Solution 1. Create a function select which takes a list and variables start, end, i as … Read more

## Python Program to Find ith Smallest Element from List in Linear Time

This is a Python program to select the ith smallest element from a list in expected linear time. Problem Description The program takes a list and i as input and prints the ith smallest element in the list. Problem Solution 1. Create a function select which takes a list and variables start, end, i as … Read more

## Python Program to Perform Binary Search using Recursion

This is a Python program to implement binary search with recursion. Problem Description The program takes a list and key as input and finds the index of the key in the list using binary search. Problem Solution 1. Create a function binary_search that takes a list and the variables start, end and key as arguments. … Read more

## Python Program to Perform Binary Search without Recursion

This is a Python program to implement binary search without recursion. Problem Description The program takes a list and key as input and finds the index of the key in the list using binary search. Problem Solution 1. Create a function binary_search that takes a list and key as arguments. 2. The variable start is … Read more