Many Leetcode questions have definitions of some data structures, for example, Linked List problem have nodes with methods “val” and “next”, Graph nodes have “val”, “left”, “right” methods etc.
My question is, should we build this classes ourself? Or FAANG interviewers already give you this structures?
Want to see the real deal?
More inside scoop? View in App
More inside scoop? View in App
blind
SUPPORT
FOLLOW US
DOWNLOAD THE APP:
FOLLOWING
Industries
Job Groups
- Software Engineering
- Product Management
- Information Technology
- Data Science & Analytics
- Management Consulting
- Hardware Engineering
- Design
- Sales
- Security
- Investment Banking & Sell Side
- Marketing
- Private Equity & Buy Side
- Corporate Finance
- Supply Chain
- Business Development
- Human Resources
- Operations
- Legal
- Admin
- Customer Service
- Communications
Return to Office
Work From Home
COVID-19
Layoffs
Investments & Money
Work Visa
Housing
Referrals
Job Openings
Startups
Office Life
Mental Health
HR Issues
Blockchain & Crypto
Fitness & Nutrition
Travel
Health Care & Insurance
Tax
Hobbies & Entertainment
Working Parents
Food & Dining
IPO
Side Jobs
Show more
SUPPORT
FOLLOW US
DOWNLOAD THE APP:
comments
Facebook just asked me to assume a definition.
It depends on the interviewer, do they want you to assume or not. Because as I wrote the tree in left and right. He changed the definition saying tree is not binary but n-ary.
My advice is to check with the interviewer..many are testing you how you will code in the production environment. And not that you are a leetcode monkey.
So ask questions and assumptions before writing code.