Better HN
topnewbestaskshowjobs
Log inSign up

Sherxon

8 karma · joined Apr 2, 2017 (9y ago) · 10 submissions

Submissions

comment 9y ago · link · parent

cool (y) I wonder how much time did u spend everyday

comment 9y ago · link · parent

Yes, many problems are the same as leetcode problems. The purpose of this repo is just learning.

comment 9y ago · link · parent

You are right, thinking logically is always better option than memorizing solutions. To have a good thinking ability, one needs practice. Solving many problems leads you to think different approaches, compute running time and space complexity of your solution before writing code to any problem. I think, this is one of the best ways to improve "thinking".

comment 9y ago · link · parent

Right, Deque is also another option, which has the same amortized time complexity and but extra O(n) space is required for Queue. In the given solution, O(n) time complexity and O(1) space is used

comment 9y ago · link · parent

i fixed the link, thanks (y)

comment 9y ago · link · parent

Thank you for your comment, I added all problem statements. Find Duplicates are correct and tested against 100 test cases. Problem statement is not what u thought I think. Given an array of integers, 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once. Find all the elements that appear twice in this array.

7.

Linked List Common Problems and Solutions(sherxon.com ↗)

2 points · by Sherxon · 9y ago · discuss

8.

Binary Tree Common Problems and Solutions(sherxon.com ↗)

3 points · by Sherxon · 9y ago · discuss