Intuit Coding & Algorithms Interview Questions
Practice the exact questions companies are asking right now.
Sum palindrome-change costs over all substrings
You are given a DNA string dna consisting only of characters A, C, G, T. For any substring dna[l..r], define its palindrome modification cost as the m...
Find largest filename from ls -l output
You are given a multi-line string (via stdin) that represents the output of ls -l, with one entry per line. Each file line follows the typical ls -l f...
Solve word segmentation and React palindrome validation
Part A — String segmentation: Given a non-empty string s and a dictionary of valid words, design an algorithm to determine whether s can be segmented ...
Implement LRU, Extend to LFU, Analyze Complexity
Implement an in-memory Least Recently Used (LRU) cache with capacity N that supports get(key) -> value and put(key, value). Achieve O( 1) average time...
Implement nth Fibonacci number
Problem Write a function that returns the n-th Fibonacci number. The Fibonacci sequence is defined as: - \(F(0)=0\) - \(F(1)=1\) - \(F(n)=F(n-1)+F(n-2...