Skip to content

Design -2 - #2496

Open
Cheran021 wants to merge 2 commits into
super30admin:masterfrom
Cheran021:master
Open

Design -2#2496
Cheran021 wants to merge 2 commits into
super30admin:masterfrom
Cheran021:master

Conversation

@Cheran021

Copy link
Copy Markdown

No description provided.

@super30admin

Copy link
Copy Markdown
Owner

Implement Queue using Stacks (Sample.java)

E.g., VERDICT: PASS

VERDICT: PASS


Design HashMap

Strengths:

  • The MyHashMap implementation is correct and follows the reference solution's approach closely
  • Good use of Swift optionals and guard statements for safe unwrapping
  • Clean separation of helper functions (getHash, getPrev)
  • Proper handling of edge cases (empty buckets, key not found)

Areas for Improvement:

  • Remove the MyQueue code: The submission contains a complete solution for a different problem (Design Queue using Stacks). This is extraneous and should be removed to keep the submission focused on the HashMap problem.
  • Fix the file naming: The file is named "Sample.java" but contains Swift code. Use a proper filename like "MyHashMap.swift".
  • Fill in the comments: The header comments for Time Complexity, Space Complexity, etc. are empty and should be filled in.
  • Language consistency: The reference solution is in Java, but you submitted in Swift. While this is acceptable, ensure your submission matches the expected language if specified.

VERDICT: PASS

Sign up for freeto 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

@Cheran021@super30admin