Skip to content

Meta Coding Questions - DSA Problems & Solutions

Practice Meta placement paper coding questions with detailed solutions. Access Meta OA coding problems in Python, C++, Java.

This page contains Meta coding questions from Meta OA placement papers with detailed solutions.

Meta OA Coding Section:

  • Problems: 3-4 coding problems
  • Time: 60-90 minutes
  • Languages: Python, C++, Java
Q1: Determine if a string containing parentheses is valid.

Solution (Python):

def isValid(s):
stack = []
mapping = {')': '(', '}': '{', ']': '['}
for char in s:
if char in mapping:
if not stack or stack.pop() != mapping[char]:
return False
else:
stack.append(char)
return not stack

Time Complexity: O(n)


Practice Meta coding questions regularly!