Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for bug #61 #118

Closed
wants to merge 300 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
300 commits
Select commit Hold shift + click to select a range
fc38e63
--fix : comment
ashokdey Sep 8, 2019
db6f79b
--update: initial implementation
ashokdey Sep 8, 2019
f413b65
--fix: edge case of upper case alphabet
ashokdey Sep 8, 2019
aa610aa
--fix: missing case for -ve new index
ashokdey Sep 8, 2019
fc8170f
--update: final implementation
ashokdey Sep 8, 2019
73a49c5
--fix: spell fix
ashokdey Sep 8, 2019
5dfaf81
--update: max2 initialization, return false if no pair found
ashokdey Sep 8, 2019
6a3e32c
Merge pull request #9 from knaxus/fix-sum-upto-N
ashokdey Sep 8, 2019
552bf00
--update: get pair of index for two numbers sum to N
ashokdey Sep 9, 2019
b68aa58
--update: replaced indexof with Map(), throw error on missing arguments
ashokdey Sep 9, 2019
436293a
--update: added fibonacci
ashokdey Sep 9, 2019
46dcf70
--update: added optimized fibonacci using cache
ashokdey Sep 9, 2019
1123481
--update: 32-bit signed int reversal
ashokdey Sep 10, 2019
9d82c02
Added get-maze-path problem and added complexities in previous problems
Sep 13, 2019
0e71035
Merge branch 'branch1' of https://github.com/navneet15/problem-solvin…
Sep 13, 2019
d40713f
--fix: removed outdated files
ashokdey Sep 22, 2019
4a93ef6
--fix-conflict: got files from master
ashokdey Sep 22, 2019
b47e5c3
Merge pull request #10 from knaxus/classics
ashokdey Sep 22, 2019
cddea0f
Merge pull request #6 from navneet15/branch1
ashokdey Sep 22, 2019
e960f8e
update: Fibonacci using tabular method
ashokdey Sep 23, 2019
14f950a
Merge pull request #12 from knaxus/classics
ashokdey Sep 24, 2019
e68c9d0
update: new problem added
ashokdey Sep 25, 2019
0758df4
update: cleanup and comments
ashokdey Sep 25, 2019
7ab5452
update: reduced a comparision on every iteration
ashokdey Sep 25, 2019
20d20c7
fix: comment
ashokdey Sep 25, 2019
4858018
Merge pull request #13 from knaxus/problems
ashokdey Sep 25, 2019
55180df
update: table of contents in README
ashokdey Sep 25, 2019
e62c31f
update: complete TOC, change in repo name
ashokdey Sep 25, 2019
4f5a2ad
Merge pull request #14 from knaxus/readme
ashokdey Sep 25, 2019
499b78f
--update : add A* algo
TheSTL Sep 26, 2019
08255f9
--update : add A* in README.md
TheSTL Sep 26, 2019
9e7aaa8
update: re-ordered TOC
ashokdey Sep 27, 2019
50260ae
update: new problem added
ashokdey Sep 28, 2019
5458f1f
update: solution in O(n)
ashokdey Sep 28, 2019
5c0daed
Merge branch 'master' of github.com:knaxus/problem-solving-javascript…
ashokdey Sep 28, 2019
286a5c5
update: README updated
ashokdey Sep 28, 2019
4c0c79b
update: solution for baseball game
ashokdey Sep 28, 2019
4e1a014
update: Added link in Readme
ashokdey Sep 28, 2019
831c2ce
fix: updated all the packages
ashokdey Sep 28, 2019
a6829ef
update: min stack class added
ashokdey Sep 28, 2019
cf2bce6
update: readme
ashokdey Sep 28, 2019
2319fa0
update: find next greater for each element in an array
ashokdey Sep 28, 2019
03793c7
update: readme linked to new problem
ashokdey Sep 28, 2019
9b60713
update: detect loop in Linked List
ashokdey Sep 29, 2019
f240811
Merge pull request #15 from knaxus/problems
ashokdey Sep 29, 2019
d4bdfce
Update README.md
ashokdey Oct 3, 2019
f9332e9
Update README.md
ashokdey Oct 3, 2019
1078575
Add unit tests for "find-2-nums-adding-to-n". Fix findTwoNumsAddingTo…
mattstates Oct 3, 2019
03dfe45
Merge pull request #19 from mattstates/master
ashokdey Oct 3, 2019
12ec6be
Added reverse-linked-list problem
ulasaydin Oct 3, 2019
80c7481
Merge branch 'master' of https://github.com/knaxus/problem-solving-ja…
ulasaydin Oct 3, 2019
0ca904c
Fixed reverseLinkedList testing bug
ulasaydin Oct 3, 2019
ecf987a
Adjust file to keep consistency
Oct 4, 2019
26bbfbd
Add tests for get-string-permutation
Oct 4, 2019
729bcef
Cover case of an empty string in get-string-permutations
Oct 4, 2019
6a01a38
Fix readme to reflect new filename
Oct 4, 2019
f7edc4d
Adjust output type to array in the documentation
Oct 4, 2019
c5a5b19
Add tests fot next-greater-element
Oct 4, 2019
a04413a
Add unit tests to Max Product of 3 numbers problem
LeoSL Oct 4, 2019
85eae6c
Add unit tests for findMaxConsecutive1s
narsaynorath Oct 4, 2019
0b27bfd
Merge pull request #27 from narsaynorath/add_max_consecutive_1s_tests
ashokdey Oct 4, 2019
2326ce9
--fix : throw error for invalid argument
TheSTL Oct 4, 2019
89aa24f
add find-2nd-max tests
deadem Oct 4, 2019
0bb4701
--update : change if condition
TheSTL Oct 4, 2019
10460ba
add subsequence tests
deadem Oct 4, 2019
4e87f2c
Merge pull request #28 from knaxus/max-product-of-3-numbers
ashokdey Oct 4, 2019
8874899
Merge pull request #29 from deadem/find-2nd-max-tests
ashokdey Oct 4, 2019
a2efcaa
Merge pull request #30 from deadem/subsequence-test
ashokdey Oct 4, 2019
bbc1e05
Merge pull request #25 from marcelinol/add-test-for-next-greater-element
ashokdey Oct 4, 2019
f0acd69
Merge pull request #23 from marcelinol/add-test-for-string-permutation
ashokdey Oct 4, 2019
1c67d3b
Update index.js
ulasaydin Oct 4, 2019
7272287
Merge pull request #20 from ulasaydin/master
ashokdey Oct 4, 2019
5de00b8
Add test case when the array length is less than 3
LeoSL Oct 4, 2019
18b87eb
balanced-parenthesis
SumeetHaryani Oct 4, 2019
93c0074
Merge pull request #31 from SumeetHaryani/master
ashokdey Oct 4, 2019
47e225f
Merge pull request #26 from LeoSL/add-test-to-max-product-of-3-numbers
ashokdey Oct 4, 2019
1310b3d
--update : add doubly link list
TheSTL Oct 5, 2019
385bac9
postfix-expression evaluation problem
SumeetHaryani Oct 5, 2019
8a83a0e
Merge pull request #1 from SumeetHaryani/logical-problems
SumeetHaryani Oct 5, 2019
0eb57d3
update readme.md
SumeetHaryani Oct 5, 2019
4fcf33b
Merge branch 'logical-problems'
SumeetHaryani Oct 5, 2019
61ca516
Merge pull request #2 from SumeetHaryani/logical-problems
SumeetHaryani Oct 5, 2019
7fd2113
--refactor : refactor length function
TheSTL Oct 5, 2019
1cb6b7e
--fix : fix doublyLinkedList length
TheSTL Oct 5, 2019
c47e2a5
--update : add LRUCache data structure
TheSTL Oct 5, 2019
749a46e
--update : move LRU cache into _Algorithms_
TheSTL Oct 5, 2019
25b55ff
--fix : fix require
TheSTL Oct 5, 2019
4c57773
Added Contribution Guide
ashokdey Oct 5, 2019
5ddfd31
--update : README.md
TheSTL Oct 5, 2019
c130045
update: add new stack problem
ashokdey Oct 6, 2019
abd4395
update: entry in readme
ashokdey Oct 6, 2019
aba216b
update: infor added
ashokdey Oct 6, 2019
622203f
fix: maintaining rules of stack - O(1) insertion
ashokdey Oct 6, 2019
03400ea
fix: correct implementation of all the methods, keeping rules inact
ashokdey Oct 6, 2019
c72bc92
update: delete the elements
ashokdey Oct 6, 2019
4c5ceab
update: revision to comments
ashokdey Oct 6, 2019
61f30e3
added solution for finding the smallest common number
jdhrnndz Oct 6, 2019
ba773d7
remove console messages
SumeetHaryani Oct 6, 2019
a09bf64
Merge pull request #3 from SumeetHaryani/logical-problems
SumeetHaryani Oct 6, 2019
3c24c6b
Merge branch 'master' of https://github.com/knaxus/problem-solving-ja…
SumeetHaryani Oct 6, 2019
e4db488
merge
SumeetHaryani Oct 6, 2019
09d930c
Merge branch 'master' of https://github.com/SumeetHaryani/problem-sol…
SumeetHaryani Oct 6, 2019
02cf7ed
Merge branch 'master' of https://github.com/knaxus/problem-solving-ja…
SumeetHaryani Oct 6, 2019
7dc0011
fix: removed extra if for throwing error
ashokdey Oct 6, 2019
dc69798
added 'Get Smallest Common Number' in README
jdhrnndz Oct 6, 2019
24a4e28
added remove consecutive repeated digits problem
SumeetHaryani Oct 6, 2019
3bc7ef8
update readme.md
SumeetHaryani Oct 6, 2019
233ffb6
Merge pull request #37 from jdhrnndz/master
ashokdey Oct 7, 2019
91d4d7c
update: thow overflow
ashokdey Oct 7, 2019
4f2fcda
Merge pull request #36 from knaxus/problems
ashokdey Oct 7, 2019
e6cf431
fix: More meaningful name
ashokdey Oct 7, 2019
f9cffca
Merge branch 'master' into master
SumeetHaryani Oct 7, 2019
705c860
resolve merge conflicts
SumeetHaryani Oct 7, 2019
fe67b57
resolve merge conflicts
SumeetHaryani Oct 7, 2019
0851558
update readme.md
SumeetHaryani Oct 7, 2019
8d179d6
fix file name
SumeetHaryani Oct 7, 2019
be0d54e
Merge branch 'master' of https://github.com/SumeetHaryani/problem-sol…
SumeetHaryani Oct 7, 2019
97ff52f
handling fibonacci for negative numbers and 0
SumeetHaryani Oct 7, 2019
56a1877
Merge pull request #33 from SumeetHaryani/master
ashokdey Oct 7, 2019
d67f247
--update : add SuffixTree
TheSTL Oct 7, 2019
4c1817d
Add unit test to loop-in-list
DaniloBarros Oct 8, 2019
4afe0ff
Merge pull request #46 from DaniloBarros/add-test-to-loop-in-list
ashokdey Oct 8, 2019
44c0669
Merge pull request #45 from knaxus/SuffixTree
ashokdey Oct 8, 2019
354a32d
Merge branch 'master' into DoublyLinkList
ashokdey Oct 8, 2019
df0c549
Merge pull request #32 from knaxus/DoublyLinkList
ashokdey Oct 8, 2019
0ec3d00
Update README.md
ashokdey Oct 8, 2019
6c3f600
Merge branch 'master' of github.com:knaxus/problem-solving-javascript…
ashokdey Oct 8, 2019
e99a210
refactor: folder structure
ashokdey Oct 8, 2019
265d41f
update: BST insertion added
ashokdey Oct 8, 2019
fb16339
update: preorder traversal
ashokdey Oct 8, 2019
46fcbeb
update: return pre-order traversal as an array
ashokdey Oct 8, 2019
847a78b
cleanup
ashokdey Oct 8, 2019
927e30a
cleanup
ashokdey Oct 8, 2019
2a3ed44
update: implementation of Inorder Traversal
ashokdey Oct 8, 2019
3553612
update: added Postorder traversal
ashokdey Oct 8, 2019
170d1d8
update: entry for trees in README
ashokdey Oct 8, 2019
a4f0c7e
update: search in BST
ashokdey Oct 8, 2019
8ac486f
update: isEmpty()
ashokdey Oct 8, 2019
45a61a6
Merge pull request #49 from knaxus/problems
ashokdey Oct 8, 2019
f5818f1
add test smallest number
Oct 8, 2019
9ed53dd
add new scenario
Oct 8, 2019
873dee6
return list instead of console.log
maharshi-gor Oct 8, 2019
3d4950a
Adds testing for the get mazePath problem #48
glennforrest Oct 8, 2019
bcaaa75
Merge pull request #50 from dwncy/feature/test-smallest-number
ashokdey Oct 8, 2019
7af200f
Merge branch 'master' of github.com:knaxus/problem-solving-javascript…
ashokdey Oct 8, 2019
092fc97
update: Added layered methods to simplify BST APIs
ashokdey Oct 8, 2019
d536c0d
update: delete in BST
ashokdey Oct 8, 2019
2733c27
cleanup
ashokdey Oct 8, 2019
457086f
update: find min of BST
ashokdey Oct 8, 2019
a6bc53e
fix: missing case of 2 delete Node with 2 childs
ashokdey Oct 8, 2019
9453441
cleanup
ashokdey Oct 8, 2019
74db2ca
update: added getMaximum
ashokdey Oct 8, 2019
37ebdae
fix: undefined due to ```node.data```
ashokdey Oct 8, 2019
4d9316d
update: aded info for clarity
ashokdey Oct 8, 2019
7af9b59
Merge pull request #56 from knaxus/problems
ashokdey Oct 8, 2019
7b8ce8d
Add unit tests to postfix expression evaluation function. Resolves #34
Oct 9, 2019
149c899
Merge pull request #52 from Mk996/master
ashokdey Oct 9, 2019
86e6c3f
Merge pull request #59 from vobango/master
TheSTL Oct 10, 2019
5f17510
Merge pull request #53 from glennforrest/adds-tests-for-get-mazePath
TheSTL Oct 10, 2019
4650f6f
update: find k-th max in BST
ashokdey Oct 10, 2019
02fa753
update: entry in readme
ashokdey Oct 10, 2019
9628ef5
Merge branch 'master' of github.com:knaxus/problem-solving-javascript…
ashokdey Oct 10, 2019
14e85aa
fix: closing of `<sup>`
ashokdey Oct 10, 2019
88b5b80
fix: typo error
ashokdey Oct 10, 2019
77ede7e
update: find kth min & throw error for invalid K
ashokdey Oct 10, 2019
ddf72b5
Merge branch 'problems' of github.com:knaxus/problem-solving-javascri…
ashokdey Oct 10, 2019
0c2afc2
update: entry in README & folder rename
ashokdey Oct 10, 2019
b5e1790
update: rename folder and fix condition for K
ashokdey Oct 10, 2019
a1470a7
update: fix entries in readme
ashokdey Oct 10, 2019
07ac906
update: find all ancestors of a node
ashokdey Oct 10, 2019
cfe769e
update: entry in README
ashokdey Oct 10, 2019
3978492
update: reverse order of pushing nodes
ashokdey Oct 10, 2019
d02c019
update: height of BST
ashokdey Oct 10, 2019
429999f
update: entry in README
ashokdey Oct 10, 2019
be544f4
update: Find k nodes from the root
ashokdey Oct 10, 2019
28bb406
update: entry in README
ashokdey Oct 10, 2019
0185751
Merge pull request #62 from knaxus/problems
TheSTL Oct 10, 2019
6e151eb
Fix Fibonacci problem for negative numbers (#55)
SumeetHaryani Oct 10, 2019
c0c0e39
fix: change in code, return null when node not found
ashokdey Oct 11, 2019
7b1dc3e
update: fix the edge case using array approach
ashokdey Oct 11, 2019
a1264be
Merge pull request #63 from knaxus/trees
ashokdey Oct 11, 2019
1103dfc
Merge pull request #1 from knaxus/master
iamshadmirza Oct 11, 2019
7be9eae
Added Unit test for BST insert and delete
Oct 11, 2019
1eefc4a
Added tests for BST insertion
balajipachai Oct 11, 2019
9cd47d7
Test cases for BST traversals
balajipachai Oct 11, 2019
c4882d9
Merge pull request #70 from balajipachai/test-cases-for-bst-traversals
TheSTL Oct 11, 2019
5fbbae6
Completed test cases for deletion
balajipachai Oct 11, 2019
6715269
Delete .DS_Store
iamshadmirza Oct 12, 2019
5889018
Delete .DS_Store
iamshadmirza Oct 12, 2019
c3cbaec
Add tests for LRUCache
luhego Oct 12, 2019
a0ebb3c
Add jumpSearch and Tests
rubysdeadname Oct 12, 2019
781f01e
Merge pull request #77 from luhego/add-tests-for-lru-cache
TheSTL Oct 12, 2019
a515098
add complexity
rubysdeadname Oct 12, 2019
ce07850
Added tests for verifying tree was created as expected.
balajipachai Oct 13, 2019
d7369a1
update: added tail of LL
ashokdey Oct 13, 2019
2439cd8
Added tests to verify tree was created as expected.
balajipachai Oct 13, 2019
028a452
update: size property aded
ashokdey Oct 13, 2019
426377a
update: implemented Queue using SLL
ashokdey Oct 13, 2019
ea84561
fix: peek() should show the front item of queue
ashokdey Oct 13, 2019
7217fb0
fix: change in Queue APIs
ashokdey Oct 13, 2019
f1fc548
fix: change in equality, fix in test case for new Queue API
ashokdey Oct 13, 2019
eb951c6
cleanup
ashokdey Oct 13, 2019
0b2228b
update: reverse-first-k elements of a queue
ashokdey Oct 13, 2019
ca23787
update: gen binary numbers using queue
ashokdey Oct 13, 2019
9a88963
update: entry added in README
ashokdey Oct 13, 2019
0b97923
cleanup
ashokdey Oct 13, 2019
71c9b8e
update: queue using stack
ashokdey Oct 13, 2019
77a6bc5
update: entry in readme
ashokdey Oct 13, 2019
236ac01
Merge pull request #79 from knaxus/linked-lists
TheSTL Oct 13, 2019
a41e786
Merge pull request #80 from knaxus/queue
TheSTL Oct 13, 2019
52f8c43
Merge pull request #81 from knaxus/problems
TheSTL Oct 13, 2019
ec7aafd
Merge pull request #78 from gabrielbarker/jumpSearch
TheSTL Oct 13, 2019
428410f
delete test removed
Oct 14, 2019
6e65f77
delete unit test for bst added
Oct 14, 2019
685265d
--fix : suffix tree
TheSTL Oct 14, 2019
afb05fa
Added sort a stack problem and solution. (#85)
SumeetHaryani Oct 14, 2019
b605481
Merge pull request #86 from iamshadmirza/bst-delete-unit-test
ashokdey Oct 14, 2019
7544e03
Merge pull request #69 from balajipachai/test-cases-for-bst-insertion
ashokdey Oct 14, 2019
b06e219
Add factorial problem
Oct 15, 2019
408fb6f
Add factorial test
Oct 15, 2019
332f2bc
LCA implementation (fixes #89) (#91)
amahdy Oct 15, 2019
c748b1e
Merge pull request #94 from iamvalentin23/master
ashokdey Oct 16, 2019
6d926b1
Add Ternary search (#76)
Kyle-Ski Oct 16, 2019
c35434b
update: Binary Tree (!BST) added
ashokdey Oct 17, 2019
31aaebd
update: entry added in Readme
ashokdey Oct 17, 2019
68993dd
Merge branch 'master' of github.com:knaxus/problem-solving-javascript…
ashokdey Oct 17, 2019
bb3255d
fix: empty array throw error
ashokdey Oct 17, 2019
791c30c
Merge pull request #73 from balajipachai/test-cases-for-bst-deletion
ashokdey Oct 17, 2019
8368232
Merge pull request #96 from knaxus/problems
ashokdey Oct 17, 2019
5e6ba61
Added tests for the AStar algorithm, alligned all names with the nami…
ngittlen Oct 18, 2019
543acad
Fixed egde case with checking grid bounds
ngittlen Oct 18, 2019
54b7f28
update: added travese methos to return array of elements in LL
ashokdey Oct 18, 2019
4a2abeb
fix: varialble name changes
ashokdey Oct 18, 2019
b007bdd
update: change in method name
ashokdey Oct 18, 2019
13f3806
Create LICENSE
ashokdey Oct 18, 2019
b2922d3
Create CONTRIBUTING.md
ashokdey Oct 18, 2019
ead7b22
Update README.md
ashokdey Oct 18, 2019
aa21c93
Merge pull request #102 from knaxus/ll
TheSTL Oct 18, 2019
84cb982
Merge pull request #100 from ngittlen/master
TheSTL Oct 18, 2019
282294b
update: TrieNode, insert() in Trie
ashokdey Oct 19, 2019
164d39c
update: trie search()
ashokdey Oct 19, 2019
427349c
update: entry in readme
ashokdey Oct 19, 2019
9d3abc8
Merge pull request #104 from knaxus/trie
TheSTL Oct 19, 2019
349227c
change: the data part should be named as my_data
sanyamdogra Oct 19, 2019
9b952bd
revert: got back to initial naming and added a marker
sanyamdogra Oct 19, 2019
3ecfecb
Merge pull request #109 from sanyamdogra/master
ashokdey Oct 19, 2019
855e533
Add Test for Binary Tree Preorder Traversal
theIYD Oct 19, 2019
bfb659f
Merge pull request #111 from theIYD/master
TheSTL Oct 19, 2019
f30d448
Fixes for bug #61
Oct 20, 2019
6b68ea3
thow Error instead of error message as string.
Oct 21, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update: table of contents in README
  • Loading branch information
ashokdey committed Sep 25, 2019
commit 55180df6e20a2c5d6d6b44b8624421fe6a716b1b
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,21 @@
[![Build Status](https://travis-ci.org/knaxus/problem-solving-javascript.svg?branch=master)](https://travis-ci.org/knaxus/problem-solving-javascript)
[![Coverage Status](https://coveralls.io/repos/github/knaxus/problem-solving-javascript/badge.svg?branch=master)](https://coveralls.io/github/knaxus/problem-solving-javascript?branch=master)

Collection of interview questions with Unit Tests
Collection of interview questions with Unit Tests. Problems includes Data Structures, Logical and few Classical problems.

## Table of Contents

### Classics

- [Caeser Cipher](src/_Classics_/caeser_cipher)
- [Fibonacci](src/_Classics_/fibonacci)

### Data Structures

- [Singly Linked List](src/_DataStructures_/LinkedList)
- [N Element From Last](src/_DataStructures_/LinkedList/element-from-last)
- [Middle Node](src/_DataStructures_/LinkedList/middle-node)
- [Stack](src/_DataStructures_/Stack)
- [Implement Queue Using Stack](src/_DataStructures_/Stack/immitate-queue-using-stack)
- [Queue](src/_DataStructures_/Queue)
- [Weave](src/_DataStructures_/Queue/weave)