Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a problem on Merge K Sorted Arrays #1718

Merged
merged 6 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/DSA-Problem-Solution/Merge_K_Sorted_Arrays.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The **Merge K Sorted Arrays** problem is an intuitive problem based on Priority

Given:

- A 2D array of integers `arr` of size k\*k.
- A 2D array of integers `arr` of size $k\*k$.

Objective:

Expand All @@ -35,8 +35,8 @@ Objective:

### Time Complexity

- **Time Complexity**: O(K^2\* log(K)), where insertion and deletion in a Min Heap requires log K time and for all K^2 elements it takes (K^2 \* log(K)) time
- **Space Complexity**: O(K) for the result array.
- **Time Complexity**: $O(K^2\* log(K))$, where insertion and deletion in a Min Heap requires log K time and for all $K^2$ elements it takes $(K^2 \* log(K))$ time
- **Space Complexity**: $O(K)$ for the result array.

### C++ Implementation

Expand Down
3 changes: 2 additions & 1 deletion docs/DSA-Problem-Solution/Sliding Window Maximum.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ id: sliding-window-maximum
title: Sliding Window Maximum
sidebar_label: LeetCode 239
tags: [LeetCode , Arrays, Queue , Sliding Window , Heap (Priority Queue) , Monotonic Queue]
description: Given array of integers nums , with sliding window of size k which is moving from the very left of the array to the very right.Return the max for each sliding window.
description: "Given array of integers nums , with sliding window of size k which is moving from the very left of the array to the very right.Return the max for each sliding window."
---

# Sliding Window Maximum (LeetCode 239)
Expand Down Expand Up @@ -83,3 +83,4 @@ public:
};

```