Sherxon
Re:100 days of algorithms
on Saturday July 08, 2017 @02:56PM (#14726694)
cool (y) I wonder how much time did u spend everyday
Re:Common Algo Problem Solutions
on Saturday April 08, 2017 @10:02AM (#14066935)
Yes, many problems are the same as leetcode problems. The purpose of this repo is just learning.
Re:Common Algo Problem Solutions
on Saturday April 08, 2017 @09:49AM (#14066879)
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".
Re:Common Algo Problem Solutions
on Saturday April 08, 2017 @09:42AM (#14066842)
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
Re:Common Algo Problem Solutions
on Saturday April 08, 2017 @09:38AM (#14066824)
i fixed the link, thanks (y)
Re:Common Algo Problem Solutions
on Saturday April 08, 2017 @01:04AM (#14065409)
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.