TGViewer
Coding Projects Coding Projects @programming_experts · 67.9K subscribers
Post #2772 2.7K
🚀 Coding Interview Questions with Answers (Part 11)

1️⃣0️⃣1️⃣ What is Memoization?

Answer:

Memoization is a top-down Dynamic Programming technique where the results of previously solved subproblems are stored (cached). When the same subproblem appears again, the stored result is returned instead of recomputing it.

Advantages:

• Avoids repeated calculations

• Improves performance

• Reduces time complexity

Example: Fibonacci sequence using recursion with caching.

1️⃣0️⃣2️⃣ What is Tabulation?

Answer:

Tabulation is a bottom-up Dynamic Programming approach that solves smaller subproblems first and stores their results in a table. The final solution is built iteratively without recursion.

Advantages:

• No recursion overhead

• Avoids stack overflow

• Often faster than memoization

Example: Fibonacci sequence using an array.

1️⃣0️⃣3️⃣ What is Backtracking?

Answer:

Backtracking is an algorithmic technique that builds a solution step by step and abandons a path as soon as it determines that the path cannot lead to a valid solution.

Applications:

• N-Queens Problem

• Sudoku Solver

• Maze Solving

• Permutations and Combinations

Time Complexity: Depends on the problem, often exponential.

1️⃣0️⃣4️⃣ What is Branch and Bound?

Answer:

Branch and Bound is an optimization technique used to solve combinatorial problems by systematically exploring all possible solutions while eliminating branches that cannot produce a better result.

Applications:

• Travelling Salesman Problem

• Job Scheduling

• Knapsack Problem

Benefit: Reduces unnecessary computations compared to brute force.

1️⃣0️⃣5️⃣ What is Recursion?

Answer:

Recursion is a programming technique where a function calls itself to solve smaller instances of the same problem.

Every recursive function must have:

• Base Case: Stops recursion.

• Recursive Case: Calls itself with a smaller input.

Examples:

• Factorial

• Fibonacci

• Tree Traversal

1️⃣0️⃣6️⃣ What is Tail Recursion?

Answer:

Tail recursion is a special type of recursion where the recursive call is the last operation performed by the function.

Advantages:

• More memory efficient

• Can be optimized into iteration by some compilers

• Reduces stack usage

1️⃣0️⃣7️⃣ What is the Sliding Window Technique?

Answer:

Sliding Window is an algorithmic technique used to solve problems involving arrays or strings by maintaining a window of elements and moving it across the data.

Applications:

• Maximum sum subarray

• Longest substring without repeating characters

• Minimum window substring

Benefit: Often reduces time complexity from O(n²) to O(n).

1️⃣0️⃣8️⃣ What is the Two Pointers Technique?

Answer:

The Two Pointers technique uses two indices that move through an array or string to solve problems efficiently.

Applications:

• Two Sum (sorted array)

• Remove duplicates

• Reverse an array

• Check palindrome

Benefit: Frequently reduces time complexity from O(n²) to O(n).
  • ❤ 6
More from @programming_experts
  1. Oct 7, 2026🧩Now, Let's Understand Functions in Programming 👨‍💻🔥 After variables, operators, condi…
  2. Oct 7, 2026🚀𝗣𝗮𝘆 𝗔𝗳𝘁𝗲𝗿 𝗣𝗹𝗮𝗰𝗲𝗺𝗲𝗻𝘁 𝗧𝗿𝗮𝗶𝗻𝗶𝗻𝗴 | 𝗕𝗲𝗰𝗼𝗺𝗲 𝗮 𝗙𝘂𝗹𝗹𝘀𝘁𝗮𝗰…
  3. Oct 7, 2026𝗠𝗮𝘀𝘁𝗲𝗿 𝗣𝗼𝘄𝗲𝗿 𝗕𝗜 𝗳𝗼𝗿 𝗙𝗥𝗘𝗘! 🔥 Learn Power BI through these FREE learnin…
  4. Sep 29, 2026Post #2901
  5. Sep 29, 2026Post #2900
  6. Sep 29, 2026Post #2899
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →