Quora Article - mayankbindas/Interview-Prep GitHub Wiki
It depends. You have left out a lot of details. In any case no one can answer as to how long it might take you. It all depends on your capability.
This answer contains general guidelines on how to prepare for tech interviews. I have included relevant links as footnotes.
Are you able to translate your thoughts into code? If not check out project Euler1(https://www.quora.com/How-long-does-it-take-to-master-algorithms-and-data-structures-to-get-a-job-at-Amazon-as-SDE#YwoTK) and solve the first 30 questions in your favourite programming language. If your language skills are weak, first fix that because there is no point proceeding with weak command over language as you will fail the coding round. Do you understand pointers2(https://www.quora.com/How-long-does-it-take-to-master-algorithms-and-data-structures-to-get-a-job-at-Amazon-as-SDE#wdZzS), memory management3(https://www.quora.com/How-long-does-it-take-to-master-algorithms-and-data-structures-to-get-a-job-at-Amazon-as-SDE#JpMTw) and how function calls work internally4(https://www.quora.com/How-long-does-it-take-to-master-algorithms-and-data-structures-to-get-a-job-at-Amazon-as-SDE#nxumM)? If not check out check out the footnotes. You can check out the rest by reading Dennis Ritchie’s C. Are you basic oops concepts5(https://www.quora.com/How-long-does-it-take-to-master-algorithms-and-data-structures-to-get-a-job-at-Amazon-as-SDE#ezBzX) clear? Are you still in college? If so which year? I ask this because intern interviews are generally easier as expectations are not that high. Can you implement basic data structures like stacks, queues, link lists6(https://www.quora.com/How-long-does-it-take-to-master-algorithms-and-data-structures-to-get-a-job-at-Amazon-as-SDE#uRxax), graphs, trees7(https://www.quora.com/How-long-does-it-take-to-master-algorithms-and-data-structures-to-get-a-job-at-Amazon-as-SDE#XYEdh), heaps8(https://www.quora.com/How-long-does-it-take-to-master-algorithms-and-data-structures-to-get-a-job-at-Amazon-as-SDE#tRjHt) and algorithms like merge sort9(https://www.quora.com/How-long-does-it-take-to-master-algorithms-and-data-structures-to-get-a-job-at-Amazon-as-SDE#SkkpE), heap sort, quick sort10(https://www.quora.com/How-long-does-it-take-to-master-algorithms-and-data-structures-to-get-a-job-at-Amazon-as-SDE#SqAgL), traversals, BFS11(https://www.quora.com/How-long-does-it-take-to-master-algorithms-and-data-structures-to-get-a-job-at-Amazon-as-SDE#DksFw), DFS12(https://www.quora.com/How-long-does-it-take-to-master-algorithms-and-data-structures-to-get-a-job-at-Amazon-as-SDE#bMlOq) etc:- in your sleep? Do you understand time space complexity13(https://www.quora.com/How-long-does-it-take-to-master-algorithms-and-data-structures-to-get-a-job-at-Amazon-as-SDE#xsqlm) and how to make tradeoff’s given constraints? Are your fundamentals of OS14(https://www.quora.com/How-long-does-it-take-to-master-algorithms-and-data-structures-to-get-a-job-at-Amazon-as-SDE#xHcxc), DBMS15(https://www.quora.com/How-long-does-it-take-to-master-algorithms-and-data-structures-to-get-a-job-at-Amazon-as-SDE#ynchk), networks16(https://www.quora.com/How-long-does-it-take-to-master-algorithms-and-data-structures-to-get-a-job-at-Amazon-as-SDE#vvPMn) crystal clear? Shallow knowledge is not good enough. In depth knowledge of basic concepts is required. If the answer to any of the above questions is NO then you need to revisit your basics.
If the answer to all the questions is YES, then no problem. You're just out of practice. Just go to leetcode17(https://www.quora.com/How-long-does-it-take-to-master-algorithms-and-data-structures-to-get-a-job-at-Amazon-as-SDE#UnsJX) and solve as many problems as you can and mark my words, you will breeze through any tech interview.
Footnotes
[1] About - Project Euler [2] https://pdos.csail.mit.edu/6.828/2014/readings/pointers.pdf [3] https://people.freebsd.org/~lstewart/articles/cpumemory.pdf [4] Understanding how function call works [5] OOP: Everything you need to know about Object Oriented Programming [6] Data Structures: Stacks & Queues [7] 5. Binary Search Trees, BST Sort [8] 4. Heaps and Heap Sort [9] 3. Insertion Sort, Merge Sort [10] Quick Sort - Computerphile [11] 13. Breadth-First Search (BFS) [12] 14. Depth-First Search (DFS), Topological Sort [13] Know Thy Complexities! [14] Introduction to Operating Systems - Chester Rebeiro | IIT Madras - NPTEL - YouTube [15] DBMS NPTEL - YouTube [16] CS144 Introduction to Computer Networking Fall 2016 Stanford University - YouTube [17] LeetCode - The World's Leading Online Programming Learning Platform