Skip to content

Adding all the solutions#1861

Open
subbu4061 wants to merge 1 commit intosuper30admin:masterfrom
subbu4061:master
Open

Adding all the solutions#1861
subbu4061 wants to merge 1 commit intosuper30admin:masterfrom
subbu4061:master

Conversation

@subbu4061
Copy link

No description provided.

@super30admin
Copy link
Owner

Your solution for the "Disappeared Numbers" problem is excellent. You have implemented an optimal solution with O(n) time and O(1) space (excluding the output). The approach of marking indices by negating values is efficient and avoids using extra data structures. The code is clear and well-commented.

However, note that the problem statement was for a C++ solution, but you provided a Java solution. While the algorithm is language-agnostic, it's important to follow the problem requirements. In this case, since the problem was presented with a C++ reference solution, you should ensure you are writing in the correct language. But since the problem is about the algorithm, and your solution is correct and efficient, this is a minor point.

For future submissions, make sure to use the language specified in the problem. Also, while your comments are helpful, avoid including multiple solutions in one submission unless asked.

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