r/codinginterview • u/jesuismike • Aug 06 '20
r/codinginterview • u/oobhai • Jul 29 '20
Parentheses Checker. Medium level Coding problem. Hope this will be helpful to someone.
r/codinginterview • u/bparanj • Jul 28 '20
Longest Substring with Same Letters after Replacement
r/codinginterview • u/bparanj • Jul 25 '20
Join the Live Leetcode Coding Today at 4 pm EST
r/codinginterview • u/bparanj • Jul 13 '20
Problem Definition Phase
It is critical to define the problem and devise requirements. I have created a document that illustrates how you can define a problem: https://drive.google.com/file/d/1SqO7q5F-9s0wX1a8LrWjZjhxw_0hJCD4/view?usp=sharing Any feedback is welcome.
r/codinginterview • u/bparanj • Jul 02 '20
First Recurring Letter using Recursion
r/codinginterview • u/[deleted] • Jun 27 '20
Can someone please recommend a Java Beginners Book/resource for me that covers all the fundamentals? Thanks.
r/codinginterview • u/bparanj • Jun 08 '20
Base Conversion - Decimal to Binary using Recursion
r/codinginterview • u/bparanj • May 31 '20
Insert Operation in BST using Recursion
Introduction
Interface
Size of the problem
Base case
Code
r/codinginterview • u/HelpingHand007 • May 31 '20
Why You Must Learn Prefix Sum Algorithm? | Need of prefix-sum Algorithm | EP1
This tutorial ranked number 1 on Google and YouTube.so thought of sharing with you all.
If you are a competitive programmer or preparing for competitive programming or solve coding problems online then you would have come across one algorithm called prefix sum.But most of people do know the benefit of this algorithm.
Here is the tutorial which explains why you must know prefix-sum algorithm.
https://youtu.be/scD312I7kkE
#tutorial #coding #programming #learntocode #algorithm #prefixsum #competitiveprogramming
r/codinginterview • u/bparanj • May 30 '20
Searching in a Binary Search Tree
Introduction - Covers the basic concepts of a Binary Search Tree
Implement search using recursion
Size of the problem
Base cases
Problem decomposition
Recursive cases
Recursive solution
Time complexity
r/codinginterview • u/bparanj • May 28 '20
Tree traversals using Recursion
How to decompose the tree traversal problem?
How to find the base case and the recursive cases?
How to traverse a binary search tree inorder, postorder and preorder?
r/codinginterview • u/bparanj • May 27 '20
Binary Search using Recursion
Binary Search Explanation
Problem decomposition
Base cases
Time complexity of binary search
Walkthrough of the code (method parameters, base cases and recursive cases)
r/codinginterview • u/bparanj • May 23 '20
Equal Strings using Recursion
Interface (input and output)
Base case
Size of the problem
Linear recursive algorithm
Recursion diagram
Problem decomposition
Boolean function
Recursive solution
Tail recursive algorithm
Short circuit evaluation
Recursion diagram
Comparison of linear and recursive solution
r/codinginterview • u/bparanj • May 22 '20
Contains Digit using Recursion
Problem Statement
Program interface
Assumption on input
Linear recursive algorithm
Recursion diagram
Tail recursive algorithm
Short circuit evaluation
Relationship between base cases and recursive case
One base case vs Two base cases
Time complexity
Similar problem
r/codinginterview • u/jaspindersingh83 • May 15 '20
DP == Optimization of repeated sub problems.
How to identify every DP problem.
Check if greedy (Choosing an optimal decision at every step) works for the problems. If not
Draw the recursive brute force solution of a problem and Identify the repeated sub problem.
Decide whether to use a 1D array or a 2D to memoize the repeated sub problems results.
Every DP problem can be identified using above cardinal rules. DP problems are easiest to decipher.
r/codinginterview • u/SynthesizeMeSun • May 14 '20
Golang REST API With Mux #4 | Build an Inventory System, FAST!
r/codinginterview • u/bparanj • May 14 '20
Power Function using Recursion
Powers of 2 (warmup)
Exponentiation operator
Implement without using exponentiation operator
Iterative solution
Product accumulator
Powers of a given base
Recursive implementation in linear time
Size of the problem
Base cases
Reduce and combine
Allow negative integer exponents
Problem decomposition
Recursive case
Relationship between reduction step and base case
Function to express recursive case
Multiple recursive cases
Powers in logarithmic time
Handling multiple cases and its effect on recursion diagram
Recursive function with multiple recursive cases
Direct translation of mathematical function to code
r/codinginterview • u/bparanj • May 13 '20
Even Number using Recursion
Implement iteratively without using % operator
Time and space complexity
Iterative Solution
Using multiply and divide
Recursion diagram
Recursive solution
Fixing stack overflow error
Reduction step
Trivial combine step
Tail recursion
Two base cases
How many base cases are required?
Time and space complexity
Linear recursion
r/codinginterview • u/bparanj • May 12 '20
Remainder using Recursion
Deriving equation to solve a problem
Time complexity for equation based implementation
Solving the problem by hand (brute force)
Solving the problem by translating manual steps to iterative code
Recognizing nothing to be done in combine step using recursion diagram
Trivial combine step in recursion leads to tail recursion
Comparison of iterative and recursive solution to see how terminating condition maps to base case, result and reduced value are the same in this case
r/codinginterview • u/bparanj • May 06 '20
Which is the most challenging topic to master for coding interview preparation?
If other, please mention the topic in the comments.
r/codinginterview • u/bparanj • May 04 '20
Division using Recursion
Implement division without using / operator using recursion. The outline for the lesson:
Using a counter
How to create a trace table
Concrete case analysis using recursion diagram
Reducing the problem size by more than one unit
Recognize implicit counter in recursive code
Solution with diagrams: https://www.rubyplus.net/2020/05/division-using-recursion.html
r/codinginterview • u/_return_zero • Apr 30 '20