Problem Solving with Algorithms

반응형

Hello all,

I compiled a list of facebook phone interview questions from this discuss section. Hope it helps!!

https://leetcode.com/problems/product-of-array-except-self/

https://leetcode.com/problems/leftmost-column-with-at-least-a-one/

https://leetcode.com/problems/employee-free-time/

 

www.geeksforgeeks.org/lowest-common-ancestor-in-a-binary-tree-set-2-using-parent-pointer/

 

https://leetcode.com/problems/subarray-sum-equals-k/

https://leetcode.com/problems/copy-list-with-random-pointer/

https://leetcode.com/problems/serialize-and-deserialize-binary-tree/

https://leetcode.com/problems/word-break-ii/

Validate Single Binary Tree

Task Scheduler

https://leetcode.com/problems/target-sum/

https://leetcode.com/problems/generate-parentheses/

https://leetcode.com/problems/nth-digit/

https://leetcode.com/problems/insert-delete-getrandom-o1/

https://leetcode.com/problems/insert-delete-getrandom-o1-duplicates-allowed/

https://leetcode.com/problems/accounts-merge/

https://leetcode.com/problems/valid-word-abbreviation/

https://leetcode.com/problems/candy-crush/

https://leetcode.com/problems/koko-eating-bananas/

https://leetcode.com/problems/binary-tree-right-side-view/

https://leetcode.com/problems/restore-ip-addresses/

https://leetcode.com/problems/powx-n/

https://leetcode.com/problems/russian-doll-envelopes/

https://leetcode.com/problems/walls-and-gates/

https://leetcode.com/problems/best-time-to-buy-and-sell-stock/

https://leetcode.com/problems/find-largest-value-in-each-tree-row/

https://leetcode.com/problems/add-strings/

https://leetcode.com/problems/combination-sum/

https://leetcode.com/problems/maximum-swap/

Dot Product of Sparse vectors
https://leetcode.com/discuss/interview-question/124823/

  • Find an efficient way to represent a vector (1,1,1,1,1,1,22,2,2,2,2,2,2,2,3,4,4,5,6,6,7,7,7,8,8,8,9,9,9,99,9,,1,1,1,1,1,1,2,3,34,3,4,,3,3,3,3....)
  • Use the representation you come up with to compute dot product of two vectors
    • Ex: If you come up with MyDataStructure to represent a vector, then your function signature will be
      int dotProduct(MyDataStructure vector1, MyDataStructure vector2)
      // dot product of two vectors [1,2,3,4] and [5,6,7,8] is 1 * 5 + 2 * 6 + 3 * 7 + 4 * 8
    • Take advantage of your "efficient" representation to compute the dot product faster.

https://leetcode.com/problems/random-pick-with-weight/

Some questions are the closest that it can get to the actual question. Like Russian Doll envelopes or Task Scheduler.

 

 

 

---

 

leetcode.com/list/5h1lvmem/

 

Favorite - LeetCode

Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.

leetcode.com

 

 

 

---

 

leetcode.com/discuss/general-discussion/675445/facebook-interview-experiences-all-combined-from-lc-till-date-07-jun-2020

반응형
반응형

공유하기

facebook twitter kakaoTalk kakaostory naver band