Skip to content

Alternative Approach for Calculating the Sum of Minimum and Maximum Elements in All Subarrays of Size K#585

Open
6vam4arya wants to merge 9 commits intoloveBabbar:mainfrom
6vam4arya:alt_sumMaxMin
Open

Alternative Approach for Calculating the Sum of Minimum and Maximum Elements in All Subarrays of Size K#585
6vam4arya wants to merge 9 commits intoloveBabbar:mainfrom
6vam4arya:alt_sumMaxMin

Conversation

@6vam4arya
Copy link
Copy Markdown

The following file contains the code for finding the sum of minimum and maximum elements in every window of size k of a given array.
Time Complexity : Big O(n*n) where "n" is number of elements in array
Space Complexity : Big O(k) where "k" is size of window

OUTPUT SCREENSHOT
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant