Skip to content

andreeaiancovici/epi-variants

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The original Elements of Programming Interviews repository can be found here.
The book containing the problems can be found here Elements of Programming Interviews.

Elements of Programming Interviews (Java)

This repository contains solutions with detailed explanations for exercises from Elements Of Programming Interviews by Adnan Aziz, Tsung-Hsien Lee, and Amit Prakash.
Additionaly, there are some proposed solutions to variant exercises and matching problems from LeetCode.

Primitive Types

                        Problem                                                 LeetCode                                                                 Variants                                        
Bootcamp: CountBits
5.1 Parity
5.2 SwapBits
5.3 ReverseBits
5.4 ClosestIntSameWeight ClosestIntSameWeightConstantTime
5.5 PrimitiveMultiply
5.6 PrimitiveDivide
5.7 PowerXY
5.8 ReverseDigits
5.9 IsNumberPalindromic
5.10 UniformRandomNumber
5.11 RectangleIntersection FourPointsFormRectangle
RectangleIntersectionNotAlignedXY

Arrays

                        Problem                                                 LeetCode                                                 Variants                        
Bootcamp: EvenOddArray
6.1 DutchNationalFlag DutchNationalFlagWithoutPivot
MauritiusNationalFlag
BooleanValuedKeysFlag
BooleanValuedKeysFlagWithRelativeTrueOrder
6.2 IntAsArrayIncrement AddBinary
6.3 IntAsArrayMultiply
6.4 AdvanceByOffsets MinimumStepsAdvanceByOffsets
6.5 SortedArrayRemoveDups ArrayRemoveKey
SortedArrayMTimes
6.6 BuyAndSellStock LongestSubArrayWithEqualEntries
6.6 BuyAndSellStockTwice (todo) BuyAndSellStockTwiceLinearTime
6.8 PrimeSieve
6.9 ApplyPermutation InversePermutation
6.10 NextPermutation ComputeKthPermutation
ComputePreviousPermutation
6.11 OfflineSampling RandStandardC
6.12 OnlineSampling
6.13 RandomPermutation
6.14 RandomSubset (todo)
6.15 NonuniformRandomNumber NonuniformRandomNumberExpDist

Multidimensional Arrays

                        Problem                                                 LeetCode                                                 Variants                        
6.16 IsValidSudoku
6.17 SpiralOrderingSegments GenerateMatrixFromSpiralOrder
GenerateMatrixFromPSequence
EnumeratePairsInSpiralOrder
SpiralOrderingForMxNMatrix
LastElementSpiralOrderingForMxNMatrix
KThElementSpiralOrderingForMxNMatrix
6.18 MatrixRotation MatrixReflection
6.19 PascalTriangle PascalTriangleNthRowUsingNSpace

In progress...

Strings

Problem LeetCode Level Similar questions Variants
7.4 Replace and remove TelexEncoding, MergeTwoSortedArrays
7.5 Test palindromicity https://leetcode.com/problems/valid-palindrome/ 💚 Easy Valid Palindrome II, Palindrome Linked List
7.6 Reverse all the words in a sentence https://leetcode.com/problems/reverse-words-in-a-string/ 💛 Medium Reverse Words in a String II
7.7 Compute all mnemonics for a phone number https://leetcode.com/problems/letter-combinations-of-a-phone-number/ 💛 Medium Generate Parentheses, Combination Sum, Binary Watch