Skip to content

Latest commit

 

History

History
104 lines (95 loc) · 12.8 KB

README.org

File metadata and controls

104 lines (95 loc) · 12.8 KB

img/ib-logo-square.png

InterviewBit Solutions

https://img.shields.io/badge/languages-Python & C++-orange.svg https://img.shields.io/badge/License-GNU-red.svg https://img.shields.io/badge/codebeat-A-brightgreen.svg https://cdn.rawgit.com/syl20bnr/spacemacs/442d025779da2f62fc86c2082703697714db6514/assets/spacemacs-badge.svg

This is a repository of solutions to all problems I’ve solved on InterviewBit. I am not quite sure exactly how many problems there are on the website, but I’ll be updating this with every problem I solve. Please issue a pull request if you think you have a better solution or something I could improve upon.

Topics

Problem Lists

SubTopicTitleSolutionNotes
Array mathMin Steps in Infinite GridC++Simpler Than I originally thought.
Array mathMax Sum Contiguous SubarrayC++
Array mathAdd One To Number
Array mathRepeat and Missing Number Array
Array mathFlip
Simulation arrayMax Non Negative SubArrayC++ Python
Simulation arrayKth Row of Pascal’s Triangle
Simulation arrayPascal Triangle RowsPython
Simulation arraySpiral Order Matrix IIC++ Python
Simulation arrayAnti DiagonalsC++
ArrangementRotate MatrixC++
ArrangementLargest NumberC++
ArrangementNext Permutation
Bucketing or sortingHotel Bookings Possible
Bucketing or sortingWave ArrayC++
Bucketing or sortingLargest NumberC++
Bucketing or sortingMax Distance
Bucketing or sortingMaximum Consecutive Gap
Bucketing or sortingFind Duplicate in ArrayC++
Value rangesMerge IntervalsC++
Value rangesMerge Overlapping Intervals
Space recycleSet Matrix ZerosC++
Space recycleFirst Missing Integer
Missing / repeated numberFirst Missing Integer
Missing / repeated numberRepeat and Missing Number Array
Missing / repeated numberFind Duplicate in Array
Missing / repeated numberN/3 Repeat Number
SubTopicTitleSolutionNotes
AdhocPrime SumPython C++
AdhocPower of Two IntegersC++ Python
Base conversionExcel Column NumberC++ Python
Base conversionExcel Column TitleC++ Python
Digit opPalindrome IntegerC++ Python
Digit opReverse IntegerC++ Python
Number theoryGreatest Common DivisorC++ Python
Number theoryTrailing Zeros in FactorialC++ Python
Number theorySorted Permutation Rank
Number theorySorted Permutation Rank with Repeats
Number encodingRearrange ArrayC++ Python
CombinatoricsGrid Unique PathsC++ PythonNote the difference in length between the Python and C++ solutions
SubTopicTitleSolutionNotes
Simple binary searchMatrix Search
Simple binary searchSearch for a Range
Simple binary searchSorted Insert Position
Search answerSquare Root of Integer
Search answerPainter’s Partition Problem
Search answerAllocate Books
Search step simulationImplement Power Function
Sort modificationRotated Sorted Array Search
Sort modificationMedian of Array
SubTopicTitleSolutionNotes
Multiple StackMin StackC++IB has an annoying redefinition issue in their buffer.
Stack mathEvaluate ExpressionC++
Stack SimpleRedundant BracesC++
CleverStackNearest Smaller ElementC++Forgot to use a solution vector the first time around.
SubtopicTitleSolutionNotes
ExamplesIntersection of Linked ListC++
List 2 PointerPalindrome ListC++
List 2 PointerMerge Sorted ListC++
List 2 PointerRemove Duplicates from sorted list iC++
List 2 PointerRemove Duplicates from sorted list iiC++
List 2 PointerRemove nth node from list endC++
List 2 PointerRotate ListC++
List 2 PointerReverse Linked List IIC++
List 2 PointerReorder ListC++ Python
List MathAdd Two Numbers as ListsC++ Python
List MathList CycleC++ PythonPython Solution is much simpler
List SortPartiton ListC++ Python