0% found this document useful (0 votes)
10 views59 pages

Tech Screening Guide

The document outlines a comprehensive curriculum for mastering Python, JavaScript, and C++ aimed at preparing candidates for Outlier's technical screening. It covers core concepts, programming paradigms, and practical problem-solving techniques across various topics such as data types, control flow, object-oriented programming, and error handling. Each section includes practice questions to reinforce learning and assess understanding of the material.

Uploaded by

dhruvarcade45
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views59 pages

Tech Screening Guide

The document outlines a comprehensive curriculum for mastering Python, JavaScript, and C++ aimed at preparing candidates for Outlier's technical screening. It covers core concepts, programming paradigms, and practical problem-solving techniques across various topics such as data types, control flow, object-oriented programming, and error handling. Each section includes practice questions to reinforce learning and assess understanding of the material.

Uploaded by

dhruvarcade45
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Python

Python Course Outline for Outlier Screening


Python Mastery Curriculum for Outlier Screening

🎯 Goal: To master core Python fundamentals, industry-grade patterns, and screening-specific problem
solving needed to successfully pass Outlier's technical screening and become a confident Python
developer.

A. Core Syntax & Data Types

Topics:

●​ Built-in types: int, float, bool, complex, str


●​ Type casting: int(), float(), str(), implicit coercion
●​ Float precision vs Decimal, [Link]
●​ f-string, format(), rounding floats
●​ Containers: list, tuple, dict, set, frozenset
●​ String operations, slicing, Unicode, encoding (utf-8, latin-1), bytes, bytearray
●​ Container operations: mutability, identity vs equality

Practice Questions:

●​ Frequency counter using dict or Counter


●​ Convert list of string floats to rounded Decimal
●​ Normalize and extract words from UTF-8 encoded text
●​ What's the difference between list() and tuple()?
●​ When would you use Decimal over float?

B. Control Flow, Comprehensions & Expressions

Topics:

●​ if/elif/else, chained comparisons, short-circuiting


●​ for-else, while-else, break, continue
●​ enumerate, zip, zip_longest
●​ List/dict/set comprehensions
●​ Ternary expressions, generator expressions
Practice Questions:

●​ Flatten nested list using comprehension


●​ Generator that filters even numbers
●​ Predict the output of nested list comprehensions

C. Functions & Callables

Topics:

●​ Function parameters: positional-only, keyword-only, defaults


●​ *args, **kwargs, lambdas
●​ Higher-order functions
●​ Decorators: logging, retrying, timing

Practice Questions:

●​ Retry decorator
●​ Decorator to log arguments and return value
●​ What is the difference between *args and **kwargs?
●​ Write a decorator that logs function calls and output

D. Scopes, Closures & Namespaces

Topics :

●​ LEGB rule
●​ global, nonlocal
●​ Closure binding and late-binding bug
●​ Module entry point: if __name__ == '__main__'

Practice Questions:

●​ Closure-based incrementor
●​ Fix closure loop binding bug
●​ Explain late binding in closures with an example

E. Object-Oriented Programming
Topics:

●​ __init__, self, __repr__, __str__, __eq__, __lt__, __hash__


●​ @classmethod, @staticmethod
●​ Inheritance, super(), MRO
●​ @total_ordering, __slots__

Practice Questions:

●​ Create a BankAccount class


●​ Implement a custom class with __hash__ and __eq__
●​ Write a class that is hashable and can be used in a set

F. Iterators, Generators & Itertools

Topics:

●​ __iter__, __next__
●​ yield vs return
●​ itertools: chain, groupby, product, combinations, permutations

Practice Questions:

●​ Generator to yield primes


●​ Use groupby() to group logs or users
●​ What’s the difference between generator expression and list comprehension?

G. Concurrency & Parallelism

Topics:

●​ Threads vs processes
●​ GIL: limitations and implications
●​ [Link]: ThreadPoolExecutor, ProcessPoolExecutor
●​ asyncio: async def, await, gather, aiohttp

Practice Questions:

●​ Async fetch URLs


●​ Use threads to parallel-process images
●​ What are the implications of GIL in multi-threaded Python?

H. Standard Library Mastery

Topics:

●​ os, sys, pathlib, shutil, subprocess, shlex


●​ File I/O: open(), with, StringIO, BytesIO
●​ Data: json, csv, gzip, zipfile, datetime, pytz
●​ functools: lru_cache, partial
●​ collections: deque, defaultdict, namedtuple
●​ typing: List, Union, Optional, TypedDict

Practice Questions:

●​ Compress folder using zipfile


●​ Memory-efficient CSV parser
●​ Simulate a REST API call and parse JSON response

I. Error Handling, Testing & Debugging

Topics:

●​ try/except/else/finally, assert, custom exceptions


●​ Logging: levels, handlers, formatters
●​ Debugging: pdb, breakpoint()
●​ Testing: unittest, pytest, fixtures, parametrize

Practice Questions:

●​ Add logging to a script


●​ Write tests for custom logic
●​ How do you structure unit tests?
●​ How would you debug a memory leak?

J. Algorithms & Data Structures

Topics:
●​ Big-O basics
●​ Two pointers, sliding window, binary search
●​ Heaps, queues, stacks, maps
●​ Sorting patterns and built-in sorted()

Practice Questions:

●​ Longest increasing subsequence


●​ Merge k sorted lists
●​ Substring without repeats
●​ Write a function to find the longest increasing subsequence

K. Memory & Performance Optimization

Topics:

●​ timeit, cProfile, tracemalloc


●​ Memory leaks, garbage collection, del, __del__
●​ List vs Generator: speed & memory

Practice Questions:

●​ Profile a slow function


●​ Convert large list code to generator-based pipeline

L. Packaging, Environments & CI

Topics:

●​ Creating pip packages


●​ [Link], [Link]
●​ venv, pipenv, poetry
●​ Linters: flake8, black, mypy, isort
●​ GitHub Actions: test, lint, publish
●​ PyPI publishing

M. Common Python Pitfalls

Topics:
●​ Mutable default arguments
●​ is vs ==
●​ Late-binding closures
●​ Modifying a dict while iterating
●​ Float equality issues
●​ Encoding/decoding traps

Practice Questions:

●​ Fix a bug due to dict mutation in loop


●​ Why does list += list2 behave differently from list = list + list2?

N. Applied Skills for Outlier Screening

Topics:

●​ JSON schema validation: jsonschema, pydantic


●​ CSV & Excel parsing with csv, pandas
●​ REST API usage: requests, status_code, timeout, session
●​ Regex basics: [Link], findall, sub
●​ CLI Apps: argparse, click
●​ Code style: PEP8, black, naming conventions

Practice Questions:

●​ Design CLI tool for word count


●​ Validate JSON payloads with pydantic
●​ Design a CLI that accepts filename and returns word count
●​ Validate a given API response with a schema

O. File Handling in Python

Topics:

●​ File modes ('r', 'w', 'a', 'rb', 'wb', 'r+')


●​ Context managers (with open(...) as f:)
●​ Reading methods: .read(), .readline(), .readlines()
●​ Writing methods: .write(), .writelines(), flushing
●​ File pointer: .seek(), .tell()
●​ Binary vs text mode
●​ Encoding differences and cross-platform issues
●​ Handling large files
●​ Exception handling in I/O
●​ OS/pathlib utilities

Practice Questions:

●​ Copy contents of one file into another using context manager


●​ Read a large file line-by-line
●​ Debug a script missing .close()

●​ What is the difference between with open() and open()?


●​ Why use 'rb' for file reading?
●​ How do you handle large files?
●​ What happens if you open the same file in 'w' twice?
●​ Why is with a best Practice Questions?

📘 Final Outlier Screening Practice Questions Questions


Question Concept Area

Explain deep vs shallow copy in Python Memory Management

Write a decorator that logs function call arguments and return value Decorators

Given a list of numbers, find the longest increasing subsequence Algorithms

Difference between generator expression and list comprehension Iterators & Generators

Implement a thread-safe counter using [Link] Concurrency & Threading


Write a class that is hashable and can be used in a set OOP & Hashing

Why does list += list2 behave differently than list = list + list2? Mutability & Identity

What are the GIL implications in multi-threaded programs? Concurrency

Design a CLI tool that accepts a filename and prints the word count CLI Design & File Handling

Simulate a REST API call and parse the JSON response HTTP APIs & JSON Handling
JavaScript
JavaScript Mastery Curriculum for Outlier
Screening
🎯 Goal: To master core JavaScript fundamentals, industry-grade patterns, and
screening-specific problem solving needed to successfully pass Outlier's technical
screening and become a confident JavaScript developer.

A. Core Language Fundamentals


Topics:

●​ JavaScript primitive types: number (IEEE-754), bigint, string, boolean, null, undefined,
symbol
●​ Type coercion: == vs ===, implicit coercion in expressions
●​ NaN, isNaN(), [Link](), Infinity, -0 handling
●​ Difference between == and ===?
●​ Why is NaN !== NaN true?
●​ What does typeof null return and why?
●​ Output of: [Link](0.1 + 0.2 === 0.3)

B. Variables, Scope & Hoisting


Topics:

●​ var, let, const differences (scoping, re-declaration)


●​ Temporal Dead Zone (TDZ)
●​ Function and variable hoisting
●​ Hoisting behavior of let and const
●​ Difference between function declaration and expression
●​ Output-based Q: var x = 1; { let x = 2; [Link](x); }
C. Functions & this

Topics:

●​ Function declaration, expression, arrow functions


●​ call(), apply(), bind() methods
●​ Closures and IIFE (Immediately Invoked Function Expressions)
●​ Explain closure with real-life example
●​ Difference in this between arrow and normal function
●​ What will this print? (function() { [Link](this); })();

D. Objects, Prototypes & Classes


Topics:

●​ Object creation and descriptors


●​ Prototypal inheritance via [Link]
●​ ES6 classes and inheritance (extends, super)
●​ Symbols and iterables
●​ How does JavaScript prototype chain work?
●​ Difference between class-based and prototype-based inheritance
●​ Use of [Link]

E. Arrays & Iteration


Topics:

●​ Basic methods: push, pop, splice, slice, etc.


●​ Higher-order functions: map, reduce, filter, etc.
●​ Iterators & Generators
●​ What is the difference between for...of and for...in?
●​ How to flatten a nested array?
●​ What is the output of: [1,2,3].map(parseInt)?
F. Asynchronous JavaScript
Topics:

●​ Event loop: call stack, task queue, microtasks


●​ Callback, Promise chaining, async/await
●​ Error handling and Promise combinators
●​ What is the difference between microtask and macrotask?
●​ Convert a callback-style function to async/await
●​ Difference between [Link] and [Link]

G. ES Modules & Build Tools


Topics:

●​ ESM syntax: import/export


●​ CommonJS vs ESModules
●​ Bundling and tree-shaking basics
●​ Difference between default and named exports
●​ Can you mix CommonJS with ESM?

H. Browser APIs & DOM


Topics:

●​ DOM manipulation and traversal


●​ Event handling and delegation
●​ Fetch API and LocalStorage/SessionStorage
●​ How event delegation works?
●​ Difference between bubbling and capturing?
●​ LocalStorage vs SessionStorage use cases

I. [Link] & Server-Side JS


Topics:
●​ Event loop and process model in [Link]
●​ Built-in modules: fs, path, http, child_process
●​ Streams, buffers, and backpressure
●​ Synchronous vs asynchronous fs methods
●​ Buffer vs Stream
●​ Use of child_process.exec

J. Testing, Tooling & Typing


Topics:

●​ Jest, Mocha basics and mocking


●​ ESLint and Prettier basics
●​ TypeScript: types, interfaces, compilation overview
●​ Write a basic unit test for sum function
●​ Why use TypeScript in a large project?
●​ Explain lint vs formatting tools

K. Performance & Memory


Topics:

●​ Event listener leaks, garbage collection


●​ Memory holding by closures
●​ Reflow, repaint and JS performance
●​ How to avoid memory leaks in single-page apps?
●​ How to profile slow JS code?

L. Security & Best Practice Questionss


Topics:

●​ XSS prevention, CORS basics


●​ Secure localStorage usage
●​ Use of use strict, immutability, avoid globals
●​ How to sanitize HTML input?
●​ Why is eval() dangerous?
●​ CORS explanation with example

M. Common Pitfalls & Gotchas


Topics:

●​ Floating point precision


●​ Binding surprises with this
●​ Forgetting var/let/const, implicit globals
●​ Promise error swallowing
●​ Why does 0.1 + 0.2 !== 0.3?
●​ Explain: let x = y = 5; output
●​ Why does the catch block doesn't catch certain async errors?

Final Section: Outlier Screening – Actual


JavaScript Questions (Collected)
1.​ Difference between == and === in JS?
2.​ What is the output of: [Link](typeof null)?
3.​ What is a closure? Give an example.
4.​ let a = [1,2,3]; let b = a; [Link](4); [Link](a) – Explain
behavior
5.​ Explain event delegation and give a use case
6.​ Convert callback-based function to async/await
7.​ How to deep copy an object? Shallow vs Deep copy difference
8.​ How does this behave in arrow functions?
9.​ What is hoisting and what gets hoisted?
10.​Difference between [Link] and [Link]
11.​Use case of [Link]
12.​Output: [1,2,3].map(parseInt) – why this happens
13.​Write a debounce function
14.​What is prototype chain?
15.​What are microtasks and macrotasks in event loop?
16.​Difference between var, let, and const
17.​Explain: let x = y = 5 – what is x and y?
18.​How to handle error inside async/await?
19.​Output: [Link](0.1 + 0.2 === 0.3)
20.​How to flatten a deeply nested array?
21.​Why is typeof NaN === 'number'?
22.​How does garbage collection work in JS?
23.​Why use IIFE pattern?
24.​Difference between shallow and deep equality check
25.​Memory leak examples in JS apps
26.​Can you explain CommonJS vs ES Modules
27.​Write a unit test for a sum function
28.​What is TDZ (Temporal Dead Zone)?
29.​Explain lexical scoping with example
30.​What does [Link](null) mean?
C++
C++ Course Outline for Outlier Screening
🎯 Goal: Master core C++ fundamentals, modern idiomatic patterns, performance-aware

programming, and screening-style problem solving needed to pass Outlier’s technical screening
and become a confident C++ developer.

A. Core Syntax & Fundamental Types

Topics:

●​ Built-in types: int, long, long long, float, double, char, bool, wchar_t,
size_t
●​ Type modifiers: signed/unsigned, short, fixed-width types (int32_t, uint64_t)
●​ auto, decltype, type inference, using aliases, typedef
●​ const, constexpr, volatile, static at block/file scope
●​ Literals, raw string literals, character encodings, std::string, std::string_view,
C-style strings (char*)
●​ Numeric conversions, narrowing conversions, promotion rules

Practice Questions:

●​ Convert vector of double to rounded int values with safe conversions.


●​ Show when implicit narrowing conversion leads to bug and fix with explicit casts.
●​ Compare std::string vs std::string_view for substring-heavy code.
●​ When should you prefer constexpr over const?

B. Control Flow, Expressions & Modern Looping

Topics:

●​ if/else, switch (scoped enum), for (index & range-based), while, do-while,
break, continue
●​ Range-based for, structured bindings (C++17)
●​ Ternary ?:, comma operator, short-circuit evaluation
●​ enum class vs old enum

Practice Questions:
●​ Flatten a nested vector<vector<int>> using range-based for and std::move.
●​ Predict output of code using structured bindings and tuple returns.
●​ Implement a safe switch for enum class values.

C. Functions, Overloading & Templates

Topics:

●​ Function declarations, default arguments, overloading, inline functions, constexpr


functions
●​ References (&), rvalue references (&&), move semantics, std::move, std::forward
●​ Function templates, class templates, template specialization, variadic templates
●​ std::function, function pointers, std::bind, lambdas and capture-by-value/ref

Practice Questions:

●​ Write a forwarding wrapper that preserves the value category with std::forward.
●​ Implement a variadic template sum() and a fold-expression alternative.
●​ Show difference between pass-by-value and pass-by-const-ref for large objects.

D. Scopes, Namespaces & Lambda Captures

Topics:

●​ Namespaces, inline namespace, linkage (static/extern)


●​ Lifetime & scope: automatic, static, dynamic (heap) storage
●​ Lambda expressions: capture-by-value, capture-by-reference, capture-init (C++14/17)
●​ ODR (one-definition rule) basics

Practice Questions:

●​ Fix a lambda that captures a loop variable incorrectly (late-capture problem).


●​ Explain when to use an anonymous namespace vs static at file scope.

E. Object-Oriented Programming & Resource Management

Topics:
●​ Classes: constructors, destructors, copy constructor, copy assignment, move
constructor, move assignment (Rule of Three/Five/Zero)
●​ this, explicit, member initializer lists, delegating constructors
●​ Virtual functions, pure virtuals, abstract classes, RTTI (dynamic_cast, typeid)
●​ Operator overloading, friend, mutable, final, override
●​ std::unique_ptr, std::shared_ptr, std::weak_ptr, RAII idiom

Practice Questions:

●​ Implement BankAccount with proper copy/move semantics and thread-safety for


balance updates.
●​ Implement a value-type class that is usable in std::unordered_set (custom hash +
==).
●​ Demonstrate object slicing and fix with polymorphic pointers.

F. Iterators, Ranges & STL Algorithms

Topics:

●​ STL containers: vector, list, deque, set, unordered_map, map, string


●​ Iterators and iterator categories, invalidation rules, adapter iterators
●​ Algorithms: std::sort, std::stable_sort, std::lower_bound,
std::transform, std::accumulate, std::unique
●​ C++20 Ranges (std::ranges), views, lazy pipelines

Practice Questions:

●​ Use std::partition to separate even/odd numbers in-place.


●​ Explain iterator invalidation when erasing from vector vs list.
●​ Use std::ranges to filter and transform a large dataset lazily.

G. Concurrency & Parallelism

Topics:

●​ std::thread, std::mutex, std::unique_lock, std::lock_guard,


std::condition_variable
●​ std::async, std::future, std::promise, thread pools (third-party or custom)​
●​ Atomics (std::atomic<T>), memory orderings basics, data races vs race conditions
●​ High-level concerns: deadlocks, livelocks, lock granularity, thread-safety idioms

Practice Questions:

●​ Implement a thread-safe counter with std::mutex and then with std::atomic.


●​ Use std::async to parallelize computation of partial results and
std::future::get() to combine.
●​ Explain the effect of missing std::memory_order on a lock-free structure.

H. Standard Library & Tooling Mastery

Topics:

●​ <chrono>, <filesystem> (C++17), <regex>, <random>, <functional>,


<bitset>
●​ I/O: <iostream>, <fstream>, stream flags, formatting with std::format (C++20) or
fmt library
●​ Useful utilities: std::optional, std::variant, std::any, std::tuple,
std::pair
●​ Build & toolchain basics: g++, clang++, MSVC, compilation model, linking

Practice Questions:

●​ Write code to walk a directory and compress specific files (conceptual: show
filesystem usage).
●​ Parse a timestamp string into std::chrono::time_point.
●​ Convert a CSV row to a struct using std::string_view tokens.

I. Error Handling, Testing & Debugging

Topics:

●​ Exceptions: try/catch/throw, exception safety guarantees (no-throw, strong, basic)


●​ RAII for resource safety, std::lock_guard and std::unique_lock example
patterns
●​ Sanitizers: ASAN, UBSAN, TSAN; Valgrind; Addressing undefined behavior; gdb/lldb
basics
●​ Unit testing: GoogleTest, Catch2, CI integration for running tests
Practice Questions:

●​ Write a function with strong exception safety for a transactional update.


●​ Demonstrate how to find a use-after-free using AddressSanitizer.
●​ How would you structure unit tests for an I/O-heavy module?

J. Algorithms & Data Structures (C++ Focus)

Topics:

●​ Big-O fundamentals, memory complexity, amortized analysis (std::vector growth)


●​ Two pointers, sliding window, binary search, union-find, graphs, BFS/DFS with
adjacency lists
●​ Priority queues (std::priority_queue), heaps, balanced trees (std::map), hash
maps (std::unordered_map)
●​ Custom comparator functors, lambda comparators

Practice Questions:

●​ Merge k sorted std::vector<int> using std::priority_queue.


●​ Longest substring without repeating characters using sliding window (C++
implementation).
●​ Implement union-find with path compression and union by rank.

K. Memory & Performance Optimization

Topics:

●​ Move semantics for zero-copy: std::move, emplace_back, reserve to avoid


reallocations
●​ Smart pointers vs raw pointers, make_unique/make_shared, memory leaks and
ownership bugs
●​ Cache-aware programming, data locality, POD vs non-POD types
●​ Profiling: perf, gprof, compiler options (-O2, -Ofast), inlining,
__attribute__((always_inline)) (use sparingly)

Practice Questions:

●​ Profile and optimize a function that repeatedly reallocates a vector — show reserve fix.
●​ Convert code using shared ownership to unique ownership where possible and explain
benefits.
●​ Reduce memory footprint by switching to std::string_view and std::span where
appropriate.

L. Packaging, Build Systems & CI

Topics:

●​ CMake basics: targets, linking, custom commands, [Link] structure


●​ Package managers: Conan, vcpkg; linking third-party libs, ABI concerns
●​ Static analysis: clang-tidy, cppcheck; formatting: clang-format
●​ CI pipelines: GitHub Actions / GitLab CI for build → test → static analysis → coverage

Practice Questions:

●​ Create a minimal [Link] for a multi-file executable + library.


●​ Show a GitHub Actions job that builds with sanitizers and runs tests.

M. Common C++ Pitfalls

Topics:

●​ Undefined behavior (UB) sources: signed integer overflow, dereferencing null, lifetime
issues
●​ Dangling references/pointers, double free, use-after-free
●​ Iterator invalidation rules (erase while iterating), container reallocation surprises
●​ Object slicing, implicit conversions, narrowing in braced init lists
●​ Not following Rule of Five/Zero causing resource leaks or double-free

Practice Questions:

●​ Fix code that erases from vector while iterating (show idiomatic erase-remove or
iterator update).
●​ Why does delete on a base pointer without virtual destructor cause UB? Provide a fix.
●​ Explain the difference between push_back(obj) and emplace_back(args...) in a
templated container.

N. Applied Skills for Outlier Screening (Practical Tooling)


Topics:

●​ JSON parsing / serialization: nlohmann::json or rapidjson


●​ CSV parsing and streaming large files safely, std::istream usage
●​ Networking basics: POSIX sockets, [Link] overview, simple HTTP client libraries
(cpp-httplib)
●​ Regex: <regex>: std::regex, std::smatch
●​ CLI apps: getopt, argparse ports for C++, CLI11 library for argument parsing
●​ Interop: calling C APIs, linking with external libs, exposing clean headers

Practice Questions:

●​ Build a CLI tool that accepts filename and counts words (respect streaming large files).
●​ Validate JSON payload schema with code using nlohmann::json.
●​ Implement a simple TCP client to fetch a line from a server (conceptual or using
[Link]).

O. File Handling in C++

Topics:

●​ Streams: std::ifstream, std::ofstream, std::fstream and modes


(std::ios::binary, std::ios::in, out, app)
●​ Reading methods: getline, read, readsome, iterators to streambuf,
std::istreambuf_iterator
●​ Writing: write, buffered I/O, flush, std::ofstream::exceptions handling
●​ File pointers: seekg, seekp, tellg, tellp for binary files
●​ Cross-platform newline & encoding handling (UTF-8 assumptions), large-file support

Practice Questions:

●​ Copy file contents (binary-safe) using std::ifstream and std::ofstream with


std::istreambuf_iterator.
●​ Read a huge file line-by-line and process it without loading entire file into memory.
●​ Explain why you’d open a file with std::ios::binary and consequences on Windows
vs Unix.
📘 Final Outlier Screening — Practice Questions (short
list)
Question Concept Area

Explain deep vs shallow copy in C++ and when copy Memory Management / Copy
elision applies semantics

Implement a move-only type and show how to store it in a Move semantics & containers
container

Given a vector, remove duplicates in-place preserving first Algorithms & STL
occurrence

Difference between std::unique_ptr and Resource management


std::shared_ptr — when to use which?

Implement a thread-safe counter using std::mutex and Concurrency


then std::atomic

Explain object slicing and how to avoid it OOP & Polymorphism

Why is delete[] required for arrays allocated with Resource ownership


new[]?

Design CLI that accepts a filename and prints word counts File handling & CLI
(streaming, memory-safe)

Parse JSON response and extract nested fields using Applied skills
nlohmann::json

Why does modifying a vector while iterating invalidate Iterator invalidation


iterators, and how to fix it?

Explain std::move vs std::forward and give an Templates & forwarding


example where std::forward is required

Show how to avoid race conditions when multiple threads Concurrency &
update a shared map synchronization
Python-Question
Outlier Python Screening Question Bank
This section compiles high-quality, realistic Python questions designed to mirror the types of
problems often encountered in Outlier screenings, interviews, or pre-assessment tasks. The
question set covers fundamental and advanced concepts, debugging skills, problem-solving
patterns, and applied Python usage.

1. Core Python Fundamentals


Q1. What will this code print and why?

a = 0.05 + 0.15

print(a == 0.2)

Explain the result.

Q2. Predict the output and explain your reasoning:

a = [0, 1, 2]

b=a

[Link]([3])

print(b)

Q3. Spot the problem in the following snippet and correct it:

for j in range(4):

print(j)

if j == 1:

break

else:

print("Completed loop")
(Hint: check else alignment and behavior of for...else.)

2. Data Structures & Algorithms


Q4. Write a function that returns the third largest distinct element in a list (do not use built-in
sort()).

Q5. Describe and implement how to simulate a FIFO queue using two LIFO stacks. Provide
code.

Q6. Implement a function that checks whether a string is a palindrome, ignoring spaces and
case.

3. OOP & Decorators


Q7. Implement a decorator that prints the start time and end time of the wrapped function.

Q8. Explain and give examples showing the differences between:

●​ instance methods
●​ @classmethod
●​ @staticmethod

Q9. Given a class with name-mangled attributes (for example __secret), how can a developer
access them if needed? Explain and give an example.

4. Comprehensions, Iterators, and Generators


Q10. Convert the loop below into a list comprehension:

evens = []

for n in range(12):

if n % 2 == 0:
[Link](n * n)

Q11. Write a generator function that yields prime numbers up to n.

Q12. Explain when you would use a generator expression instead of a list comprehension.

5. Functional Programming & Lambdas


Q13. Use filter with a lambda to get values divisible by 5 from a list.

Q14. Explain the output of:

print((lambda y: y + 7)(3))

Q15. Use map and lambda to add corresponding elements of two lists: [1, 2, 3] and [4,
5, 6].

6. File Handling & CSV / JSON


Q16. Provide code to read a CSV file and return a list of dictionaries where keys are header
names.

Q17. Given a nested JSON object, show safe extraction of a deeply nested key, returning None
(or a default) if any intermediate key is missing.

Q18. Demonstrate safe file read/write with exception handling and guaranteed closure (use a
context manager).

7. Modules, Environments & Packages


Q19. How would you structure a small package with two modules and import one from the
other? Provide a minimal example (folder layout + sample import).

Q20. Explain the differences between:

●​ pip install .
●​ pip freeze > [Link]
●​ using virtual environments (e.g., venv / virtualenv)

8. Testing & Debugging


Q21. Explain the difference between assert statements and [Link] assertion
methods.

Q22. Debug and fix the following function. Why might it behave unexpectedly across calls?

def append_item(x, lst=[]):

[Link](x)

return lst

9. Async Programming
Q23. Compare threading, multiprocessing, and asyncio in terms of use-cases and
Python’s GIL implications.

Q24. Write an async function using asyncio that concurrently runs three coroutine tasks and
gathers their results.

10. Applied Use-Cases


Q25. Design a CLI utility using argparse that prints the number of words in a given file.

Q26. Implement a small REST client using requests that GETs JSON, handles non-200
responses, and returns parsed JSON (with basic error handling).

Q27. Using BeautifulSoup, write code that extracts all article headings (e.g., <h2>) from a blog
page.

Q28. Implement a function that validates whether a string matches an email regex pattern and
returns True / False.
Q29. Given a pandas DataFrame with missing values, outline three strategies to handle
missing data and show code for one of them.

Q30. List two popular formatters / linters for Python and how to run them from the command line
(examples).

Python MCQ (30 Questions)


(Choose the best answer for each)

M1. What does this print?

arr = [2, 3, 4]; b = arr; [Link](5); print(arr)

A. [2,3,4]​
B. [2,3,4,5]​
C. Error​
D. None

M2. Which data structure is immutable?​


A. list​
B. dict​
C. tuple​
D. set

M3. What is printed?

vals = [10, 11, 12, 13]; print(vals[-1])

A. 10​
B. 11​
C. 12​
D. 13

M4. [Link](0) does what?​


A. Removes and returns the last element​
B. Removes and returns the first element​
C. Deletes the list​
D. Clears the list
M5. Which one-liner creates a dict from ['x','y'] and [9,10]?​
A. dict(zip(keys, vals))​
B. {keys:vals}​
C. zip(keys,vals)​
D. keys+vals

M6. What is the distinction between is and ==?​


A. They are identical​
B. is checks identity; == checks equality of value​
C. == checks identity​
D. Neither compares values

M7. What will this output?

def g():

for i in range(2): yield i

print(list(g()))

A. [0,1]​
B. [1,2]​
C. generator object​
D. []

M8. Evaluate this dict comprehension:

{x: x+1 for x in range(3)}

A. {0:1,1:2,2:3}​
B. {1:2,2:3,3:4}​
C. [1,2,3]​
D. Error

M9. When are default parameter values evaluated?​


A. At each call​
B. When function is defined​
C. At program exit​
D. Never
M10. What prints?

def h(a, L=None):

if L is None:

L = []

[Link](a)

return L

print(h(1)); print(h(2))

A. [1], [2]​
B. [1], [1,2]​
C. [1], [1]​
D. [1,2], [1,2]

M11. Purpose of a context manager (with)?​


A. Iteration​
B. Automatic resource acquisition/release​
C. Function overloading​
D. Performance tuning

M12. Which decorator allows method call without instantiating the class?​
A. @staticmethod​
B. @classmethod​
C. @property​
D. @abstractmethod

M13. Which method returns a string suitable for debugging?​


A. __eq__​
B. __str__​
C. __repr__​
D. __len__

M14. Output of set([3,3,4,5]) is:​


A. [3,3,4,5]​
B. {3,4,5}​
C. Error​
D. None

M15. [Link]() vs [Link]():​


A. No difference​
B. [Link] is shallow, deepcopy copies nested objects​
C. deepcopy is shallow​
D. deepcopy returns same object

M16. What does the GIL (Global Interpreter Lock) imply?​


A. No multiprocessing​
B. Limits true parallelism of threads in CPython for CPU-bound tasks​
C. Prevents I/O operations​
D. Only affects Java

M17. What prints?

print(bool(''), bool('0'))

A. False True​
B. True False​
C. False False​
D. True True

M18. Minimal structure for catching exceptions?​


A. try only​
B. try + except or try + finally​
C. except only​
D. finally only

M19. Difference between @classmethod and @staticmethod?​


A. No difference​
B. classmethod receives cls; staticmethod doesn't receive implicit class or instance​
C. staticmethod receives cls​
D. Both receive self

M20. Correct import syntax to rename?​


A. from math import ceil as c​
B. import ceil from math​
C. using [Link] as c​
D. import [Link]
M21. What does this comprehension produce?

[x for x in range(6) if x % 2 == 0]

A. [1,3,5]​
B. [0,2,4]​
C. [2,4]​
D. []

M22. Purpose of if __name__ == "__main__": ?​


A. Run code only when the module is executed directly​
B. Declare main function​
C. Import builtins​
D. Check Python version

M23. What is list(enumerate(['x','y'])) ?​


A. [(0,'x'),(1,'y')]​
B. (0,'x'),(1,'y')​
C. {'0':'x','1':'y'}​
D. ['x','y']

M24. Key difference between list and tuple?​


A. list mutable, tuple immutable​
B. tuple larger memory​
C. list immutable​
D. No difference

M25. What does *args allow in a function signature?​


A. Multiple return values​
B. Variable positional arguments​
C. Keyword-only args​
D. Default params

M26. Average time complexity of set membership test?​


A. O(1)​
B. O(n)​
C. O(log n)​
D. O(n log n)

M27. Amortized time complexity of [Link](x)?​


A. O(1)​
B. O(n)​
C. O(log n)​
D. Depends

M28. Complexity of membership test 'x in list'?​


A. O(1)​
B. O(log n)​
C. O(n)​
D. O(n log n)

M29. Space complexity of recursion depth for factorial(n)?​


A. O(1)​
B. O(n)​
C. O(n^2)​
D. O(log n)

M30. Average time complexity of dictionary lookup by key?​


A. O(1)​
B. O(n)​
C. O(log n)​
D. O(n log n)


JavaScript-Question
Outlier Screening Questions (JavaScript)

1. Core JavaScript Fundamentals


Q1. What does the following print and why?

[Link]({} + []);

[Link]([] + {});

Explain any surprising behavior.

Q2. Predict the result and explain:

let arr = [1,2];

let ref = arr;

[Link](3);

[Link](ref);

Q3. Find the bug / explain the output:

for (var i = 0; i < 3; i++) {

setTimeout(function () { [Link](i); }, 0);

Why does it print what it does? How to fix it?

2. Data Structures & Algorithms (JS)


Q4. Implement a function that returns the k-th largest distinct number in an array (without using
[Link]()).

Q5. Implement a stack using two queues (explain approach and provide code).

Q6. Write a function that checks if a string is a palindrome ignoring punctuation, spaces and
letter case.

3. Classes, Prototypes & Inheritance


Q7. Create a Person class and extend it as Employee that adds a role property. Show an
example of instantiation.

Q8. Explain prototype-based inheritance vs ES6 class syntax show a minimal example of
each.

Q9. How would you add a method to all arrays (without modifying built-in prototypes in
production explain the risks)?

4. Asynchronous JavaScript & Concurrency


Q10. Convert a callback-based setTimeout wrapper into a Promise-based function and show
usage with async/await.

Q11. Write an async function that fetches three URLs in parallel and returns their JSON results
(use fetch and assume global fetch available).

Q12. Explain the event loop ordering for this snippet and state the printed order:

[Link]('A');

setTimeout(() => [Link]('B'), 0);

[Link]().then(() => [Link]('C'));

[Link]('D');
5. Closures, Memoization & Functional Patterns
Q13. Implement a memoize function that caches results of a pure single-argument function.

Q14. Show a closure example that counts how many times a returned function has been called
(preserve state between calls).

Q15. Use [Link] to flatten a single-level nested array (e.g.,


[[1,2],[3,4]] → [1,2,3,4]).

6. Iterables, Generators & Symbols


Q16. Use [Link] to make a simple iterable object that yields the first n Fibonacci
numbers.

Q17. Write a generator function that yields an infinite sequence of natural numbers (show usage
with next()).

Q18. Explain difference between iterables and iterators; when you’d prefer a generator to
building a full array.

7. DOM, Events & Browser APIs (if web-focused)


Q19. What is event delegation? Provide a short example where a parent element handles clicks
for many child buttons.

Q20. Demonstrate using the Fetch API to download JSON and handle HTTP errors (non-200
status).

Q21. Explain how localStorage differs from sessionStorage and give a simple example
for each.

8. Error Handling, Testing & Tooling


Q22. How do you handle errors inside an async function? Provide example of try/catch and
[Link].
Q23. Name two test frameworks for JavaScript and show a one-line example test (asserting a
function output).

Q24. Describe why and when you'd use a bundler (webpack/rollup) and a transpiler
(Babel/TypeScript).

9. Practical Utilities & String/Object Manipulation


Q25. Convert an object { a: 1, b: 2 } into a query string a=1&b=2 using
[Link]().

Q26. Implement a debounce function that delays invoking fn until wait ms have elapsed since
the last call.

Q27. Given a string, count character frequency and return an object { char: count }.
(Ignore case option optional.)

10. Language Quirks, Best Practices & Security


Q28. Why does typeof null return "object"? Explain the historical reason and practical
implications.

Q29. Explain == vs === and give two examples where == and === differ.

Q30. What are common XSS mitigation practices when injecting user content into the DOM?
(List 3 practical steps.)

JavaScript MCQ (30 Questions)


(Choose the best option for each)

M1. What will this print?

[Link](a);
var a = 5;

A. 5​
B. undefined​
C. ReferenceError​
D. null

M2. What will be printed?

function adder(x){ return y => x + y; }

[Link](adder(4)(6));

A. 10​
B. undefined​
C. NaN​
D. Error

M3. What happens?

foo(); function foo(){ [Link]("hi"); }

bar(); var bar = function(){ [Link]("bye"); };

A. hi then bye​
B. hi then TypeError​
C. TypeError then bye​
D. Two errors

M4. What will be logged by this snippet?

for (var i = 0; i < 3; i++) { setTimeout(() => [Link](i), 0); }

A. 0 1 2​
B. 3 3 3​
C. Error​
D. undefined

M5. Which is true about arrow functions?​


A. They have no this binding (lexical this)​
B. They create their own this context​
C. They cannot return values​
D. They cannot be used as expressions
M6. What does typeof null return?​
A. "null"​
B. "object"​
C. "undefined"​
D. Error

M7. What will NaN === NaN return?​


A. true​
B. false​
C. throws error​
D. depends

M8. Which is a correct way to shallow-copy an array a?​


A. [Link]()​
B. [...a]​
C. [Link]([], a)​
D. All of the above

M9. Which method returns a new array?​


A. map​
B. forEach​
C. both​
D. none

M10. Which permanently binds this to a function?​


A. call​
B. apply​
C. bind​
D. none

M11. What is the order of output for:

[Link]("start");

setTimeout(() => [Link]("timer"), 0);

[Link]().then(() => [Link]("promise"));

[Link]("finish");
A. start, finish, promise, timer​
B. start, promise, finish, timer​
C. start, finish, timer, promise​
D. start, timer, promise, finish

M12. What does an async function always return?​


A. a raw value​
B. a Promise​
C. undefined​
D. throws error

M13. What will typeof class A {} return?​


A. "function"​
B. "class"​
C. "object"​
D. undefined

M14. Which will NOT deep-clone an object with nested objects?​


A. structuredClone(obj)​
B. [Link]([Link](obj))​
C. [Link]({}, obj)​
D. _.cloneDeep(obj) (lodash)

M15. What will be the output?

const { x = 7 } = {};

[Link](x);

A. undefined​
B. 7​
C. null​
D. Error

M16. Difference between let and var?​


A. let is block-scoped; var is function-scoped​
B. Both are identical​
C. var is not hoisted​
D. let only works in loops

M17. What will be printed?

[Link]([...[1, 2], 3]);


A. [1,2,3]​
B. [1,3,2]​
C. [[1,2],3]​
D. Error

M18. What does function f(a, ...rest) { [Link](rest); } f(1,2,3);


print?​
A. [1,2,3]​
B. [2,3]​
C. [3]​
D. []

M19. Which prevents object modifications entirely?​


A. [Link]()​
B. [Link]()​
C. Both​
D. None

M20. What prints?

[Link]([1,2] + [3,4]);

A. [1,2,3,4]​
B. "1,23,4" (string)​
C. "1,23,4"​
D. Error

M21. When will [Link]() reject?​


A. If any promise rejects​
B. If any promise is pending​
C. If it takes too long​
D. Never

M22. What does the nullish coalescing operator ?? do?​


A. Returns right operand if left is null or undefined​
B. Always returns right operand​
C. Returns left if truthy​
D. Throws error

M23. What does optional chaining obj?.prop prevent?​


A. TypeError if obj is null/undefined​
B. Syntax error​
C. ReferenceError​
D. All

M24. Which avoids blocking the UI thread?​


A. setTimeout​
B. Promise/async-await (non-blocking)​
C. both​
D. none

M25. Difference between debounce and throttle?​


A. Debounce waits for inactivity; throttle limits calls per interval​
B. Opposite​
C. Same​
D. Neither exist

M26. Time complexity of [Link]()?​


A. O(1) amortized​
B. O(n)​
C. O(log n)​
D. Depends

M27. Time complexity of [Link](x)?​


A. O(1)​
B. O(log n)​
C. O(n)​
D. O(n log n)

M28. Complexity of inserting at beginning of an array (unshift)?​


A. O(1)​
B. O(n)​
C. O(log n)​
D. O(n log n)

M29. Space complexity (call stack) of naive recursive Fibonacci?​


A. O(1)​
B. O(n)​
C. O(2^n) time, O(n) space​
D. O(log n)

M30. Average time complexity of property lookup on plain JS object?​


A. O(1) average​
B. O(n) average​
C. O(log n)​
D. O(n log n)
C++-Question
📘 Outlier C++ Screening Question Bank
This section compiles high-quality, realistic C++ screening questions designed to mirror
Outlier’s interview/pre-assessment style. The set spans core language, modern C++ idioms,
STL/algorithms, OOP, memory, concurrency, and applied use-cases.

1. Core C++ Fundamentals


Q1. What does this print and why? Explain any surprising behavior.

int a = 10;
unsigned int b = static_cast<unsigned int>(-2);
std::cout << (a < b) << std::endl;

Q2. Predict the output and explain:

std::string str = "hi";


std::string_view sv = str;
str += " there";
std::cout << sv << std::endl;

Q3. Find and fix the bug:

int* p = new int[10];


// ... use p ...
delete p; // problem

2. Data Structures & Algorithms


Q4. Implement a function that returns the second-largest distinct integer in a
std::vector<int> without calling std::sort().

Q5. Describe and implement a queue using two std::stack<int> instances (provide
push/pop code).
Q6. Write a function that tests whether a given std::string is a palindrome, ignoring
punctuation and case.

3. Functions, Templates & References


Q7. Write a function template wrap that forwards its argument to another callable preserving
value category (std::forward usage).

Q8. Explain differences between passing a large object by value, by reference, and by const
&. Show short code demonstrating copy vs no-copy.

Q9. Why is std::forward<T> necessary in perfect-forwarding wrappers but std::move is


not equivalent? Give a short example.

4. OOP & Resource Management


Q10. Implement a BankAccount class supporting deposit/withdraw, and define copy/move
constructors and assignments (Rule of Five — keep it minimal but correct).

Q11. Explain object slicing with an example. How would you avoid slicing when storing
heterogeneous polymorphic objects?

Q12. Compare std::unique_ptr<T> and std::shared_ptr<T> — when to use each and


show a short code snippet for basic usage.

5. Iterators, Ranges & STL


Q13. Rewrite the indexed loop below using a range-based for loop:

for (size_t i = 0; i < [Link](); ++i)


std::cout << vec[i] << ' ';

Q14. What happens to iterators after erasing an element from std::vector vs std::list?
Provide a brief example showing iterator validity after erase.
Q15. Using C++20 ranges (or equivalent if unavailable), show how to lazily select even numbers
from a std::vector<int> and transform them (square) — show conceptual code.

6. Concurrency & Parallelism


Q16. Implement a thread-safe counter twice: (a) using std::mutex, (b) using
std::atomic<int>. Show simple increment.

Q17. Use std::async (or thread pool style) to compute partial sums of a large vector
concurrently and combine results.

Q18. Briefly explain the consequences of omitting proper memory ordering in lock-free
algorithms (what bugs can occur?).

7. File Handling & Practical C++ Use-Cases


Q19. Write streaming code to read a very large text file line-by-line (memory-safe) and count
lines.

Q20. Build a tiny CLI (using argc/argv) that accepts a filename and prints the number of
words (streaming, minimal memory).

Q21. Using nlohmann::json (or pseudo-code), safely extract nested "profile" → "user"
→ "id" returning an optional/empty value if missing.

Q22. Use <regex> to implement a simple email validation function (explain caveats of
regex-based validation).

8. Debugging, Error Handling & Testing


Q23. Explain why this causes undefined behavior and fix it:

class Base { ~Base() {} };


Base* b = new Base();
delete b;
Q24. Show a small code snippet that produces a use-after-free bug and explain how
AddressSanitizer would help detect it.

Q25. Describe the difference between basic, strong, and no-throw exception guarantees.
Provide an example function that offers strong guarantee.

9. Advanced Algorithms & Optimization


Q26. Implement Union-Find (Disjoint Set Union) with path compression and union-by-rank in
modern C++.

Q27. Given k sorted std::vector<int>, merge them into a single sorted


std::vector<int> using a min-heap (std::priority_queue with custom comparator).

Q28. The following code fills a vector — profile and suggest improvements:

std::vector<int> v;
for (int i = 0; i < 1'000'000; ++i) {
v.push_back(i);
}

Explain at least two ways to optimize.

10. Systems, Best Practices & Misc


Q29. Explain RAII and show a small RAII wrapper for a file descriptor (open/close) or for FILE*.

Q30. When compiling with optimization flags (e.g., -O2 vs -O3), what differences might you
expect? Mention possible pitfalls of aggressive inlining and floating-point math changes.

■ C++ MCQs (30 Questions)


Choose the best answer for each.

M1. What prints?


std::vector<int> v = {1,2,3};
auto u = v;
u.push_back(4);
std::cout << [Link]();

A. 3​
B. 4​
C. Undefined behavior​
D. Compiler error

M2. Which of these is not a type modifier in C++?​


A. short​
B. signed​
C. volatile​
D. mutable

M3. What happens if you call delete on a pointer allocated with new[]?​
A. Frees correctly​
B. Undefined behavior​
C. Only first element freed​
D. Compiler error

M4. What does emplace_back do compared to push_back?​


A. Inserts a default element​
B. Constructs element in-place to avoid copies/moves​
C. Always faster​
D. No difference

M5. Which container guarantees stable iterators on insertion (i.e., iterators remain valid when
inserting new elements)?​
A. std::vector​
B. std::list​
C. std::deque​
D. std::string

M6. Which C++ feature enables creating lambdas with captured variables?​
A. auto​
B. decltype​
C. [] capture syntax​
D. Template specialization

M7. When is copy elision (mandatory RVO) required by the standard (C++17+)?​
A. Always for all returns​
B. When returning a local prvalue directly​
C. Only in debug builds​
D. Never

M8. Average time complexity of std::unordered_map lookup?​


A. O(1) average​
B. O(n) average​
C. O(log n)​
D. O(n log n)

M9. Why declare a base class destructor virtual?​


A. To enable operator overloading​
B. So deleting a derived object through base pointer calls derived destructor (avoid UB)​
C. To allow templates​
D. To improve performance

M10. Which keyword requests compile-time evaluation (C++11+)?​


A. const​
B. static​
C. constexpr​
D. volatile

M11. What is the correct way to free memory allocated by new[]?​


A. delete ptr;​
B. delete[] ptr;​
C. free(ptr);​
D. delete all ptr;

M12. What does std::move do?​


A. Physically move memory contents​
B. Cast an lvalue to an rvalue to enable moving semantics​
C. Copy object​
D. Delete object

M13. Which container provides random access iterators?​


A. std::list​
B. std::vector​
C. std::forward_list​
D. std::set

M14. If a destructor is ~Base() = default; and non-virtual, deleting derived via base* leads
to:​
A. Well-defined behavior​
B. Undefined behavior if derived has non-trivial destructor resources​
C. Compile-time error​
D. Runtime exception

M15. What is the complexity of std::vector::push_back amortized?​


A. O(1) amortized​
B. O(n)​
C. O(log n)​
D. O(1) worst-case

M16. Which header provides std::thread?​


A. <thread>​
B. <pthread.h>​
C. <concurrency>​
D. <threads>

M17. What is returned by std::unique_ptr<T>::release()?​


A. Deletes the managed object​
B. Releases ownership and returns raw pointer without deleting​
C. Throws exception​
D. Returns nullptr

M18. Which of these guarantees does std::vector::erase provide about other iterators?​
A. All iterators remain valid​
B. Iterators at and after the erased element are invalidated; others remain valid (for vector)​
C. All iterators invalidated only for list​
D. No invalidation ever

M19. What will sizeof(std::string_view) most likely be?​


A. Size of pointer only​
B. Two machine words (pointer + length)​
C. Same as std::string on all platforms​
D. Zero

M20. What does noexcept indicate?​


A. Function may throw exceptions​
B. Function does not throw exceptions (or calling std::terminate on throw)​
C. Compiler will ignore exceptions​
D. None
M21. Which statement about std::shared_ptr is true?​
A. It's always thread-safe for concurrent reads/writes of the same control block without
synchronization​
B. Reference counting is atomic in implementations meeting the standard (so
increment/decrement can be thread-safe) but object access is not synchronized​
C. It prevents memory leaks in all cases​
D. It is faster than unique_ptr

M22. What is the result of this code?

std::vector<int> v;
[Link](2);
v.push_back(1);
v.push_back(2);
v.push_back(3);

A. [Link]() >= 3 and no reallocations occurred​


B. At least one reallocation occurred when pushing the 3rd element​
C. Compile error​
D. Undefined behavior

M23. Which algorithm would you choose for stable sorting with std::stable_sort
complexity?​
A. O(n log n) guaranteed stable​
B. O(n^2) average​
C. O(n) average​
D. O(log n)

M24. What is the effect of calling std::ios::sync_with_stdio(false) in main()?​


A. Synchronizes C and C++ IO for safety​
B. Disables synchronization between C and C++ stdio to speed up i/o (but don't mix
scanf/printf with cin/cout)​
C. Makes IO thread-safe​
D. No effect

M25. Which of these is true about std::vector<bool>?​


A. Behaves identically to std::vector<T> for all T​
B. Specializes to a proxy-reference implementation which can have surprising behavior​
C. Stores bool as 8-bit bytes per element​
D. Is removed from the standard

M26. What does RAII stand for?​


A. Resource Acquisition Is Initialization​
B. Run-time Allocation Is Immediate​
C. Resource Allocation Is Immediate​
D. Random Access Is Immutable

M27. Which operator can be overloaded as a member function only (not free function)?​
A. operator+​
B. operator=​
C. operator<<​
D. operator==

M28. What does std::clamp(x, lo, hi) do? (C++17)​


A. Returns x always​
B. Clamps x to the range [lo, hi]​
C. Throws if x out of range​
D. Rounds x

M29. What is a safe way to iterate and erase elements from a std::list while traversing?​
A. Increment iterator, then erase the previously visited element using returned iterator from
erase​
B. Use range-based for and call erase(it) inside (works)​
C. Convert to vector and erase​
D. Erase in a separate loop after collecting indices

M30. Which flag enables standard-compliant C++17 compilation with g++?​


A. -std=c++11​
B. -std=c++14​
C. -std=c++17​
D. -std=gnu++03
Sample Video Interview / Personal
Questions
These are the following list for Video Interview / Personal Questions !!

1.​ Tell me about a time you faced a tough deadline - how did you manage?
2.​ Describe a conflict you had on a team and how you resolved it.
3.​ Have you mentored or trained someone? Describe the experience.
4.​ Talk about a time you received critical feedback - what did you change?
5.​ Describe a time when you had to adapt quickly to a change in priorities.
6.​ Describe your experience with data annotation, reviewing model outputs, or evaluating
AI content
7.​ Provide an example of a small project you completed end-to-end.
8.​ Describe a bug you found and fixed — how did you diagnose it?
9.​ What steps do you take to learn new technical skills?
10.​Explain a technical concept (e.g., overfitting, API, or webhooks) to a non-technical
person.
11.​How would you give feedback to someone whose work is close to production but has
minor issues?
12.​Describe a time you explained a complex idea and the approach you used.
13.​How do you prioritize clarity vs brevity when communicating?
14.​Describe how you ensure your written instructions (or prompts) are easy to follow.
15.​Describe a hobby or interest that you’re passionate about.

You might also like