Interview Q&A

Master technical and career interviews with structured answers—short definition, real examples, pitfalls, and how to answer in 60–90 seconds.

4608 total questions 4508 technical 100 career & HR 4272 from PDF library

Showing 201–225 of 288

Career & HR topics

By tech stack

Mid PDF
Custom Attributes in C#?

Short answer: Real Use Cases Validation frameworks Logging metadata Role-based security API documentation metadata Custom Attribute Example [AttributeUsage(AttributeTargets.Property)] public class RequiredAttribute : Att…

Power Questions Read answer
Mid PDF
Abstract Class vs Interface?

Short answer: Interface Meaning Defines capability and behavior contract Use when: Multiple inheritance is required System uses plug-in extensibility Loose coupling is necessary public interface IPayment { void Pay(decim…

Power Questions Read answer
Mid PDF
Thread-Safe Singleton?

Short answer: Incorrect (not thread-safe) public class Singleton Example code { private static Singleton _instance; } Correct using double-check locking public sealed class Singleton { private static Singleton _instance;…

Power Questions Read answer
Mid PDF
Producer–Consumer using BlockingCollection?

Short answer: BlockingCollection<int> queue = new BlockingCollection<int>(); Task.Run(() => { for(int i = 1; i <= 5; i++) { queue.Add(i); } queue.CompleteAdding(); }); Task.Run(() => { foreach(var it…

Power Questions Read answer
Mid PDF
Custom LINQ Operator?

Short answer: public static class LinqExtensions { public static IEnumerable<T> WhereNot<T>(this IEnumerable<T> source, Func<T,bool> predicate) { foreach (var item in source) if (!predicate(item))…

Power Questions Read answer
Mid PDF
Mini Dependency Injection Container?

Short answer: public class MyContainer { private Dictionary<Type, Type> map = new(); public void Register<TInterface, TImplementation>() { map[typeof(TInterface)] = typeof(TImplementation); } public TInterfac…

Power Questions Read answer
Mid PDF
Scalable Logging Framework?

Short answer: public interface ILoggerTarget { void Log(string message); } Central Logger public class Logger { private readonly List<ILoggerTarget> targets = new(); public void AddTarget(ILoggerTarget target) =&gt…

Power Questions Read answer
Mid PDF
Async Deadlocks?

Short answer: Bad example var result = GetData().Result; Correct approach await GetData(); Rules: Avoid Result Avoid Wait Remain async end-to-end Example code Bad example var result = GetData().Result; Correct approach a…

Power Questions Read answer
Mid PDF
Async Deadlocks Bad example var result = GetData().Result; Correct approach?

Short answer: wait GetData(); Rules: Avoid Result Avoid Wait Remain async end-to-end wait GetData(); Rules: Avoid Result Avoid Wait Remain async end-to-end wait GetData(); Rules: Avoid Result Avoid Wait Remain async end-…

Power Questions Read answer
Mid PDF
Span<T> / Memory<T>?

Short answer: Used for high performance scenarios involving: File processing Large memory structures Reduced garbage collection overhead Example Span&lt;int&gt; numbers = stackalloc int[3] { 1, 2, 3 }; Example code numbe…

Power Questions Read answer
Mid PDF
LRU Cache?

Short answer: Removes least recently used entries when full. public class LruCache&lt;TKey,TValue&gt; Example code { private readonly int capacity; private readonly Dictionary&lt;TKey, LinkedListNode&lt;(TKey,TValue)&gt;…

Power Questions Read answer
Mid PDF
Interactive HEAD?

Short answer: Interactive Rebase: git rebase -i &lt;commit&gt; - allows you to squash, reorder, edit, or drop commits during a rebase operation. Interactive Rebase: git rebase -i &lt;commit&gt; - allows you to squash, re…

Version Control Read answer
Mid PDF
Interactive HEAD?

Short answer: (Typo for &quot;Interactive Rebase&quot;?) Interactive Rebase: git rebase -i &lt;commit&gt; - allows you to squash, reorder, edit, or drop commits during a rebase operation. Real-world example (ShopNest) Sh…

Version Control Read answer
Mid PDF
Git bundle?

Short answer: objects into a single file for easy transfer without a network connection. Real-world example (ShopNest) ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production un…

Version Control Read answer
Mid PDF
Git bundle?

Short answer: git bundle create &lt;file.bundle&gt; &lt;ref&gt; - packs Git refs and objects into a single file for easy transfer without a network connection. Real-world example (ShopNest) ShopNest’s team uses GitHub PR…

Version Control Read answer
Mid PDF
Git blame?

Short answer: git blame &lt;file&gt; - shows who last modified each line of a file and when. Real-world example (ShopNest) ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach productio…

Version Control Read answer
Mid PDF
Git worktree?

Short answer: directory linked to your main repository, allowing you to work on multiple branches simultaneously. Real-world example (ShopNest) ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds…

Version Control Read answer
Mid PDF
Git worktree?

Short answer: git worktree add &lt;path&gt; &lt;branch&gt; - creates a new working directory linked to your main repository, allowing you to work on multiple branches simultaneously. Real-world example (ShopNest) ShopNes…

Version Control Read answer
Mid PDF
Bare repository?

Short answer: used as a central remote repository (e.g., on a server). Say this in the interview Define — one clear sentence (the short answer above). Example — relate it to a project like ShopNest or your real work. Tra…

Version Control Read answer
Mid PDF
Bare repository?

Short answer: A Git repository that does not have a working directory, typically used as a central remote repository (e.g., on a server). Say this in the interview Define — one clear sentence (the short answer above). Ex…

Version Control Read answer
Mid PDF
git stash?

Short answer: llowing you to switch branches and come back to them later. Real-world example (ShopNest) ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnoticed. Say th…

Version Control Read answer
Mid PDF
git stash?

Short answer: Temporarily saves changes that are not ready to be committed, allowing you to switch branches and come back to them later. Real-world example (ShopNest) ShopNest’s team uses GitHub PRs with reviews and CI c…

Version Control Read answer
Mid PDF
Squashing commits?

Short answer: commit, typically done during an interactive rebase. Real-world example (ShopNest) Prefer clear commits: fix(cart): prevent negative quantities instead of update . Say this in the interview Define — one cle…

Version Control Read answer
Mid PDF
Squashing commits?

Short answer: Combining multiple commits into a single, more meaningful commit, typically done during an interactive rebase. Real-world example (ShopNest) Prefer clear commits: fix(cart): prevent negative quantities inst…

Version Control Read answer
Mid PDF
git add -p?

Short answer: Allows you to interactively stage specific parts (hunks) of changes within a file. Real-world example (ShopNest) ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach produ…

Version Control Read answer

High-Impact Interview Questions Career Preparation · Power Questions

Short answer: Real Use Cases Validation frameworks Logging metadata Role-based security API documentation metadata Custom Attribute Example [AttributeUsage(AttributeTargets.Property)] public class RequiredAttribute : Attribute {} Usage Example public class Employee

Example code

{ [Required] public string Name { get; set; }
} Validation Logic public static void Validate(object obj)
{
var properties = obj.GetType().GetProperties();
foreach (var prop in properties)
{
var isRequired = prop.GetCustomAttributes(typeof(RequiredAttribute), false).Any();
if (isRequired && prop.GetValue(obj) == null) throw new Exception($"{prop.Name} is required"); }
}

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

High-Impact Interview Questions Career Preparation · Power Questions

Short answer: Interface Meaning Defines capability and behavior contract Use when: Multiple inheritance is required System uses plug-in extensibility Loose coupling is necessary public interface IPayment { void Pay(decimal amount); } Abstract Class Meaning Provides base behavior with shared implementation Represents IS-A inheritance relationship public abstract class PaymentBase

Example code

{
public void Log() => Console.WriteLine("Payment logged");
public abstract void Pay(decimal amount);
} Summary Interface = Capability Abstract Class = Shared Base Behavior

Real-world example (ShopNest)

Answer with: definition → one ShopNest-style story → trade-off → how you would verify it in production.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

High-Impact Interview Questions Career Preparation · Power Questions

Short answer: Incorrect (not thread-safe) public class Singleton

Example code

{
private static Singleton _instance;
} Correct using double-check locking public sealed class Singleton
{
private static Singleton _instance;
private static readonly object _lock = new object();
private Singleton() {}
public static Singleton Instance
{ get {
if (_instance == null)
{ lock(_lock) {
if (_instance == null)
_instance = new Singleton();
}
}
return _instance;
}
}
} Best and simplest public sealed class Singleton
{
public static readonly Singleton Instance = new Singleton();
private Singleton(){}
}

Real-world example (ShopNest)

Answer with: definition → one ShopNest-style story → trade-off → how you would verify it in production.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

High-Impact Interview Questions Career Preparation · Power Questions

Short answer: BlockingCollection<int> queue = new BlockingCollection<int>(); Task.Run(() => { for(int i = 1; i <= 5; i++) { queue.Add(i); } queue.CompleteAdding(); }); Task.Run(() => { foreach(var item in queue.GetConsumingEnumerable()) { Console.WriteLine("Consumed " + item); } }); Provides automatic thread synchronization and prevents race conditions.

Example code

BlockingCollection<int> queue = new BlockingCollection<int>(); Task.Run(() => {
for(int i = 1; i <= 5; i++)
{ queue.Add(i); } queue.CompleteAdding(); }); Task.Run(() => {
foreach(var item in queue.GetConsumingEnumerable())
{ Console.WriteLine("Consumed " + item); } }); Provides automatic thread synchronization and prevents race conditions.

Real-world example (ShopNest)

Answer with: definition → one ShopNest-style story → trade-off → how you would verify it in production.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

High-Impact Interview Questions Career Preparation · Power Questions

Short answer: public static class LinqExtensions { public static IEnumerable<T> WhereNot<T>(this IEnumerable<T> source, Func<T,bool> predicate) { foreach (var item in source) if (!predicate(item)) yield return item; } } Usage var employees = list.WhereNot(e => e.IsDeleted);

Example code

public static class LinqExtensions
{
public static IEnumerable<T> WhereNot<T>(this IEnumerable<T> source, Func<T,bool> predicate) {
foreach (var item in source)
if (!predicate(item)) yield return item; }
} Usage var employees = list.WhereNot(e => e.IsDeleted);

Real-world example (ShopNest)

Answer with: definition → one ShopNest-style story → trade-off → how you would verify it in production.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

High-Impact Interview Questions Career Preparation · Power Questions

Short answer: public class MyContainer { private Dictionary<Type, Type> map = new(); public void Register<TInterface, TImplementation>() { map[typeof(TInterface)] = typeof(TImplementation); } public TInterface Resolve<TInterface>() { var impl = map[typeof(TInterface)]; return (TInterface)Activator.CreateInstance(impl); } }

Example code

public class MyContainer
{
private Dictionary<Type, Type> map = new();
public void Register<TInterface, TImplementation>()
{
map[typeof(TInterface)] = typeof(TImplementation);
}
public TInterface Resolve<TInterface>()
{
var impl = map[typeof(TInterface)];
return (TInterface)Activator.CreateInstance(impl);
}
}

Real-world example (ShopNest)

Answer with: definition → one ShopNest-style story → trade-off → how you would verify it in production.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

High-Impact Interview Questions Career Preparation · Power Questions

Short answer: public interface ILoggerTarget { void Log(string message); } Central Logger public class Logger { private readonly List<ILoggerTarget> targets = new(); public void AddTarget(ILoggerTarget target) => targets.Add(target); public void Log(string message) { foreach (var t in targets) t.Log(message); } } Supports: Console File Database Cloud Follows Open–Closed Principle.

Example code

public interface ILoggerTarget
{ void Log(string message); } Central Logger public class Logger
{
private readonly List<ILoggerTarget> targets = new();
public void AddTarget(ILoggerTarget target)
=> targets.Add(target);
public void Log(string message)
{
foreach (var t in targets) t.Log(message); }
} Supports: Console File Database Cloud Follows Open–Closed Principle.

Real-world example (ShopNest)

Answer with: definition → one ShopNest-style story → trade-off → how you would verify it in production.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

High-Impact Interview Questions Career Preparation · Power Questions

Short answer: Bad example var result = GetData().Result; Correct approach await GetData(); Rules: Avoid Result Avoid Wait Remain async end-to-end

Example code

Bad example var result = GetData().Result; Correct approach await GetData(); Rules: Avoid Result Avoid Wait Remain async end-to-end

Real-world example (ShopNest)

Answer with: definition → one ShopNest-style story → trade-off → how you would verify it in production.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

High-Impact Interview Questions Career Preparation · Power Questions

Short answer: wait GetData(); Rules: Avoid Result Avoid Wait Remain async end-to-end wait GetData(); Rules: Avoid Result Avoid Wait Remain async end-to-end wait GetData(); Rules: Avoid Result Avoid Wait Remain async end-to-end wait GetData(); Rules: Avoid Result Avoid Wait Remain async end-to-end

Real-world example (ShopNest)

Answer with: definition → one ShopNest-style story → trade-off → how you would verify it in production.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

High-Impact Interview Questions Career Preparation · Power Questions

Short answer: Used for high performance scenarios involving: File processing Large memory structures Reduced garbage collection overhead Example Span<int> numbers = stackalloc int[3] { 1, 2, 3 };

Example code

numbers[1] = 10; Runs on stack → extremely fast.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

High-Impact Interview Questions Career Preparation · Power Questions

Short answer: Removes least recently used entries when full. public class LruCache<TKey,TValue>

Example code

{
private readonly int capacity;
private readonly Dictionary<TKey, LinkedListNode<(TKey,TValue)>> cache = new();
private readonly LinkedList<(TKey,TValue)> list = new();
public LruCache(int capacity) => this.capacity = capacity;
public TValue Get(TKey key)
{
if (!cache.ContainsKey(key)) return default;
var node = cache[key];
list.Remove(node);
list.AddFirst(node);
return node.Value.Item2;
}
public void Put(TKey key, TValue value)
{
if (cache.ContainsKey(key))
list.Remove(cache[key]);
if (cache.Count == capacity)
{
var last = list.Last; cache.Remove(last.Value.Item1); list.RemoveLast();
}
var newNode = new LinkedListNode<(TKey,TValue)>((key,value));
list.AddFirst(newNode);
cache[key] = newNode;
}
}

Real-world example (ShopNest)

Answer with: definition → one ShopNest-style story → trade-off → how you would verify it in production.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Git & GitHub Developer Essentials · Version Control

Short answer: Interactive Rebase: git rebase -i <commit> - allows you to squash, reorder, edit, or drop commits during a rebase operation. Interactive Rebase: git rebase -i <commit> - allows you to squash, reorder, edit, or drop commits during a rebase operation.

Real-world example (ShopNest)

ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnoticed.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Git & GitHub Developer Essentials · Version Control

Short answer: (Typo for "Interactive Rebase"?) Interactive Rebase: git rebase -i <commit> - allows you to squash, reorder, edit, or drop commits during a rebase operation.

Real-world example (ShopNest)

ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnoticed.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Git & GitHub Developer Essentials · Version Control

Short answer: objects into a single file for easy transfer without a network connection.

Real-world example (ShopNest)

ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnoticed.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Git & GitHub Developer Essentials · Version Control

Short answer: git bundle create <file.bundle> <ref> - packs Git refs and objects into a single file for easy transfer without a network connection.

Real-world example (ShopNest)

ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnoticed.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Git & GitHub Developer Essentials · Version Control

Short answer: git blame <file> - shows who last modified each line of a file and when.

Real-world example (ShopNest)

ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnoticed.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Git & GitHub Developer Essentials · Version Control

Short answer: directory linked to your main repository, allowing you to work on multiple branches simultaneously.

Real-world example (ShopNest)

ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnoticed.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Git & GitHub Developer Essentials · Version Control

Short answer: git worktree add <path> <branch> - creates a new working directory linked to your main repository, allowing you to work on multiple branches simultaneously.

Real-world example (ShopNest)

ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnoticed.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Git & GitHub Developer Essentials · Version Control

Short answer: used as a central remote repository (e.g., on a server).

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Git & GitHub Developer Essentials · Version Control

Short answer: A Git repository that does not have a working directory, typically used as a central remote repository (e.g., on a server).

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Git & GitHub Developer Essentials · Version Control

Short answer: llowing you to switch branches and come back to them later.

Real-world example (ShopNest)

ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnoticed.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Git & GitHub Developer Essentials · Version Control

Short answer: Temporarily saves changes that are not ready to be committed, allowing you to switch branches and come back to them later.

Real-world example (ShopNest)

ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnoticed.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Git & GitHub Developer Essentials · Version Control

Short answer: commit, typically done during an interactive rebase.

Real-world example (ShopNest)

Prefer clear commits: fix(cart): prevent negative quantities instead of update.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Git & GitHub Developer Essentials · Version Control

Short answer: Combining multiple commits into a single, more meaningful commit, typically done during an interactive rebase.

Real-world example (ShopNest)

Prefer clear commits: fix(cart): prevent negative quantities instead of update.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

Git & GitHub Developer Essentials · Version Control

Short answer: Allows you to interactively stage specific parts (hunks) of changes within a file.

Real-world example (ShopNest)

ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnoticed.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share
Toolliyo Assistant
Ask about tutorials, ebooks, training, pricing, mentor services, and support. I use public site content only—not admin or internal tools.

care@toolliyo.com

Need callback? Share your details