My solutions to HackerRank challenges.
JavaScript, Python and Go.
You can see my profile here: https://www.hackerrank.com/AminadavG.
All solution here created by me. I have tried to make the most optimal solutions. All of them are less than O(n^2). Most of them are O(n) / O(log n) or even O(1).
Table of Content:
- Problem - https://www.hackerrank.com/challenges/simple-array-sum/problem
- Solution - simple-array-sum.js
- Problem - https://www.hackerrank.com/challenges/compare-the-triplets/
- Solution - compare-the-triplets.js
- Problem - https://www.hackerrank.com/challenges/a-very-big-sum
- Solution - a-very-big-sum.js
- Problem - https://www.hackerrank.com/challenges/diagonal-difference
- Solution - diagonal-difference.js
- Problem - https://www.hackerrank.com/challenges/plus-minus/problem
- Solution - plus-minus.js
- Problem - https://www.hackerrank.com/challenges/staircase/problem
- Solution - staircase.go
- Problem - https://www.hackerrank.com/challenges/mini-max-sum/problem
- Solution - mini-max-sum.go
- Problem - https://www.hackerrank.com/challenges/time-conversion/submissions
- Solution - time-conversion.go
- Problem - https://www.hackerrank.com/challenges/designer-pdf-viewer
- Solution - designer-pdf-viewer.go
- Problem - https://www.hackerrank.com/challenges/circular-array-rotation
- Solution - circular-array-rotation.go
- Problem - https://www.hackerrank.com/challenges/tutorial-intro
- Solution - tutorial-intro.go
- Problem - https://www.hackerrank.com/challenges/insertionsort1
- Solution - insertionsort1.js
- Problem - https://www.hackerrank.com/challenges/insertionsort2
- Solution - insertionsort2.js
- Problem - https://www.hackerrank.com/challenges/runningtime
- Solution - runningtime.js
- Problem - https://www.hackerrank.com/challenges/quicksort1
- Solution - quicksort1.js
- Problem - https://www.hackerrank.com/challenges/arrays-ds
- Solution - arrays-ds.go
- Problem - https://www.hackerrank.com/challenges/2d-array
- Solution - 2d-array.go
- Problem - https://www.hackerrank.com/challenges/dynamic-array
- Solution - dynamic-array.go
- Problem - https://www.hackerrank.com/challenges/array-left-rotation
- Solution - array-left-rotation.go
- Problem - https://www.hackerrank.com/challenges/sparse-arrays
- Solution - sparse-arrays.go
- Problem - https://www.hackerrank.com/challenges/crush
- Solution - crush.js
- Problem - https://www.hackerrank.com/challenges/print-the-elements-of-a-linked-list
- Solution - print-the-elements-of-a-linked-list.js
- Problem - https://www.hackerrank.com/challenges/insert-a-node-at-the-tail-of-a-linked-list
- Solution - insert-a-node-at-the-tail-of-a-linked-list.js
- Problem - https://www.hackerrank.com/challenges/insert-a-node-at-the-head-of-a-linked-list
- Solution - insert-a-node-at-the-head-of-a-linked-list.js
- Problem - https://www.hackerrank.com/challenges/insert-a-node-at-a-specific-position-in-a-linked-list
- Solution - insert-a-node-at-a-specific-position-in-a-linked-list.js
- Problem - https://www.hackerrank.com/challenges/delete-a-node-from-a-linked-list
- Solution - delete-a-node-from-a-linked-list.js
- Problem - https://www.hackerrank.com/challenges/print-the-elements-of-a-linked-list-in-reverse
- Solution - print-the-elements-of-a-linked-list-in-reverse.js
- Problem - https://www.hackerrank.com/challenges/reverse-a-linked-list
- Solution - reverse-a-linked-list.js
- Problem - https://www.hackerrank.com/challenges/compare-two-linked-lists
- Solution - compare-two-linked-lists.js
- Problem - https://www.hackerrank.com/challenges/merge-two-sorted-linked-lists
- Solution - merge-two-sorted-linked-lists.js
- Problem - https://www.hackerrank.com/challenges/get-the-value-of-the-node-at-a-specific-position-from-the-tail
- Solution get-the-value-of-the-node-at-a-specific-position-from-the-tail.js
- Problem - https://www.hackerrank.com/challenges/delete-duplicate-value-nodes-from-a-sorted-linked-list
- Solution - delete-duplicate-value-nodes-from-a-sorted-linked-list.js
- Problem - https://www.hackerrank.com/challenges/detect-whether-a-linked-list-contains-a-cycle
- Solution - detect-whether-a-linked-list-contains-a-cycle.cpp
- Problem - https://www.hackerrank.com/challenges/find-the-merge-point-of-two-joined-linked-lists
- Solution - find-the-merge-point-of-two-joined-linked-lists.cpp
- Problem - https://www.hackerrank.com/challenges/insert-a-node-into-a-sorted-doubly-linked-list
- Solution -insert-a-node-into-a-sorted-doubly-linked-list.js
- Problem - https://www.hackerrank.com/challenges/reverse-a-doubly-linked-list
- Solution - reverse-a-doubly-linked-list.js
- Problem - https://www.hackerrank.com/challenges/tree-preorder-traversal
- Solution - tree-preorder-traversal
- Problem - https://www.hackerrank.com/challenges/tree-inorder-traversal
- Solution - tree-inorder-traversal.py
- Problem - https://www.hackerrank.com/challenges/tree-height-of-a-binary-tree
- Solution - tree-height-of-a-binary-tree.py
- Problem - https://www.hackerrank.com/challenges/sparse-arrays
- Solution - sparse-arrays.go
- Problem - https://www.hackerrank.com/challenges/detect-whether-a-linked-list-contains-a-cycle
- Solution - detect-whether-a-linked-list-contains-a-cycle.cpp
- Problem - https://www.hackerrank.com/challenges/non-divisible-subset
- Solution - non-divisible-subset.js
- Problem - https://www.hackerrank.com/challenges/extra-long-factorials
- Solution - extra-long-factorials.go
- Problem - https://www.hackerrank.com/challenges/magic-square-forming/problem
- Solution - magic-square-forming.js
- Problem - https://www.hackerrank.com/challenges/climbing-the-leaderboard
- Solution - climbing-the-leaderboard.js
- Problem - https://www.hackerrank.com/challenges/organizing-containers-of-balls/submissions/code/86847139
- Problem - https://www.hackerrank.com/challenges/organizing-containers-of-balls/problem)
- Solution - organizing-containers-of-balls.py
- Problem - https://www.hackerrank.com/challenges/encryption/problem
- Solution - encryption.py
- Problem - https://www.hackerrank.com/challenges/queens-attack-2/problem
- Solution - queens-attack-2.py
- Problem - https://www.hackerrank.com/challenges/crush
- Solution - crush.js