Skip to content

Day IDK - #4841

Merged
mayank-kumar-27 merged 4 commits into
upesacm:mainfrom
RaghavNotFound:main
Aug 20, 2026
Merged

Day IDK#4841
mayank-kumar-27 merged 4 commits into
upesacm:mainfrom
RaghavNotFound:main

Conversation

@RaghavNotFound

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI lite review requested due to automatic review settings August 19, 2026 19:03

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds new Day 48–51 DSA/LeetCode Java solutions under DSA/RaghavSinghal_590012854, continuing the daily practice structure in this repo.

Changes:

  • Day 48: add solutions for “sort the students” (LeetCode) and a reconstruction problem.
  • Day 50: add solutions for a LeetCode “final state after k operations” problem and “last rock weight”.
  • Day 51: add a receiving-log validation solution.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
DSA/RaghavSinghal_590012854/Day_51/Question2.java Adds receiving-log validation; currently contains duplicated code causing compile failure.
DSA/RaghavSinghal_590012854/Day_51/Problem1_Leetcode.java Adds “most frequent even” LeetCode solution.
DSA/RaghavSinghal_590012854/Day_50/Question2.java Adds max-heap solution for “last rock weight”.
DSA/RaghavSinghal_590012854/Day_50/Problem1_Leetcode.java Adds heap-based “final state” solution; current logic does not preserve original indices/order.
DSA/RaghavSinghal_590012854/Day_48/Question2.java Adds array reconstruction solution and a small demo main.
DSA/RaghavSinghal_590012854/Day_48/Problem1_Leetcode.java Adds Arrays.sort-based solution for sorting students by column k.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +25 to +49
}import java.util.*;

public class Main {
public static int validateReceivingLog(String[][] records) {
Map<String, String> seen = new HashMap<>();

for (int i = 0; i < records.length; i++) {
String vendorId = records[i][0];
String lotNumber = records[i][1];
String certCode = records[i][2];

String key = vendorId + "\u0000" + lotNumber;

if (seen.containsKey(key)) {
if (!seen.get(key).equals(certCode)) {
return i;
}
} else {
seen.put(key, certCode);
}
}

return -1;
}
} No newline at end of file
Comment on lines +3 to +23
class Solution {
public int[] getFinalState(int[] nums, int k, int multiplier) {
PriorityQueue<Integer> pq = new PriorityQueue<>();

for (int num : nums) {
pq.offer(num);
}

while (k-- > 0) {
int min = pq.poll();
min *= multiplier;
pq.offer(min);
}

for (int i = 0; i < nums.length; i++) {
nums[i] = pq.poll();
}

return nums;
}
} No newline at end of file
@mayank-kumar-27
mayank-kumar-27 merged commit 39c174a into upesacm:main Aug 20, 2026
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.

3 participants