Tech IndustryNov 21, 2019
Sheraton Harrisburg Hershey HoteiYGI57

python: Whiteboard — use class?

Given a question that doesnt necessarily stresses OOP, but say it uses 2-3 functions perhaps for recursion. Should one use a class? or subfunctions instead? Subfunctions can be easier done imo but not as good coding. Agree?

Dropbox rawhide Nov 21, 2019

Pseudo code and hand waves

Sheraton Harrisburg Hershey Hote iYGI57 OP Nov 21, 2019

?

Facebook ⭕w⭕ Nov 21, 2019

class Solution

Sheraton Harrisburg Hershey Hote iYGI57 OP Nov 21, 2019

Very leetcode-y but perhaps best practice?

Cornerstone nmsnn Nov 21, 2019

use classes and write production code (dependency injection for the input). explain why you are doing what you do

Sheraton Harrisburg Hershey Hote iYGI57 OP Nov 21, 2019

What if you only write a single function? Wrap it in a class as well?

Google - Hodor Nov 21, 2019

Ask your interviewers

Sheraton Harrisburg Hershey Hote iYGI57 OP Nov 21, 2019

“Would you like me to wrap this in a class or use sub functions?” <- like that?

Facebook Iff Nov 23, 2019

Don't assume, communicate. Interviews are for figuring out your potential worth as a teammate.