Completed Precourse - 2#1887
Open
yashhh-23 wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds completed implementations for several algorithm exercises (binary search, quicksort, mergesort, linked-list middle) and introduces an iterative quicksort solution while removing an unused placeholder file.
Changes:
- Implemented recursive binary search and quicksort, plus iterative quicksort using an explicit stack.
- Implemented fast/slow pointer middle-element printing for a singly linked list.
- Partially implemented merge sort (merge + recursive sort), and removed the old Exercise_5 stub.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| IterativeQuickSort.java | New iterative quicksort implementation and runnable demo |
| Exercise_5.java | Removed placeholder / incomplete quicksort stub |
| Exercise_4.java | Added merge sort implementation (merge + recursive sort) |
| Exercise_3.java | Implemented printMiddle using fast/slow pointers |
| Exercise_2.java | Implemented quicksort swap/partition/sort |
| Exercise_1.java | Implemented recursive binary search |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+5
to
+11
| void swap(int arr[], int i, int j) | ||
| { | ||
| //Try swapping without extra variable | ||
| arr[i] = arr[i] + arr[j]; | ||
| arr[j] = arr[i] - arr[j]; | ||
| arr[i] = arr[i] - arr[j]; | ||
| } |
Owner
|
Let me evaluate each file in the student's solution: 1. BInarySearch.java
2. IterativeQuickSort.java
3. MergeSort.java
4. QuickSort.java
5. SinglyLL.java
Overall Assessment:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.