Skip to content

Done Hashing-2#2186

Open
bansariradadiya01 wants to merge 1 commit into
super30admin:masterfrom
bansariradadiya01:master
Open

Done Hashing-2#2186
bansariradadiya01 wants to merge 1 commit into
super30admin:masterfrom
bansariradadiya01:master

Conversation

@bansariradadiya01

Copy link
Copy Markdown

No description provided.

@super30admin

Copy link
Copy Markdown
Owner

Subarray Sum Equals K (SumOfArraySum.java)

Strengths:

  • Correctly implements the prefix sum with hashmap technique
  • Good variable naming conventions
  • Proper handling of the base case (map initialized with 0,1)
  • Logic correctly identifies subarrays with sum equal to k

Areas for Improvement:

  1. Use map.getOrDefault(rsum, 0) + 1 instead of checking containsKey twice - this is more efficient and cleaner
  2. For LeetCode-style problems, the method should be named subarraySum and be in a class named Solution to match the expected format
  3. Consider adding comments explaining the prefix sum approach for clarity

VERDICT: PASS


Contiguous Binary Subarray (Contiguous_array.class)

  • Strengths: The file structure suggests the student attempted to implement the standard prefix sum + HashMap approach for this problem.
  • Weaknesses:
    • Submitted compiled bytecode instead of source code
    • Cannot verify correctness, logic, or code quality
    • Cannot provide specific feedback on implementation details
  • Recommendation: Please submit the .java source file so the solution can be properly evaluated. The source code should show the implementation using a HashMap to track running sum indices, which is the correct approach for this problem.

VERDICT: NEEDS_IMPROVEMENT


Longest Palindrome in a string (Palindrome.class)

Strengths:

  • The approach (using a HashSet to track unpaired characters) appears to be correct based on the bytecode analysis
  • The logic of counting pairs and handling the center character seems sound

Critical Issues:

  1. Wrong file format submitted: You submitted a .class (compiled bytecode) file instead of a .java (source code) file. For evaluation purposes, we need the human-readable source code.
  2. No source code visible: Without the .java file, we cannot properly evaluate:
    • Code structure and readability
    • Variable naming conventions
    • Comment quality
    • Overall code organization

To improve:

  • Always submit the .java source file, not the compiled .class file
  • Ensure your code is properly formatted and indented
  • Include appropriate comments explaining your approach

VERDICT: NEEDS_IMPROVEMENT

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.

2 participants