Skip to content

Instantly share code, notes, and snippets.

View inovramadani's full-sized avatar
🇮🇩
Write program that can work well with other programs

inovramadani

🇮🇩
Write program that can work well with other programs
  • Indonesia
View GitHub Profile
@inovramadani
inovramadani / codility_solution.txt
Last active January 3, 2021 02:48
Solution to programming problems in Codility (Javascript)
View codility_solution.txt
Lesson 1 - Iterations
BinaryGap: https://app.codility.com/demo/results/trainingMNDHQN-2SY/
Lesson 2 - Array
CyclicRotation: https://app.codility.com/demo/results/training672XDD-B8R/
OddOccurrencesInArray: https://app.codility.com/demo/results/trainingKHZYEY-RR6/
Lesson 3 - Time Complexity
FrogJmp: https://app.codility.com/demo/results/training6JSR59-MEM/
PermMissingElem: https://app.codility.com/demo/results/trainingBFETZ2-2GY/
@inovramadani
inovramadani / branch-squash-commits.md
Last active March 19, 2019 01:12
How to squash commits on git branch
View branch-squash-commits.md

How to squash commits on git branch

When submitting a pull request, it's important that you squash your commits to keep our repository concise and clean.

You will need to use VIM to do this.

Make sure your branch is up to date with the master branch.

  • Run git rebase -i master.
  • VIM will be opened
@inovramadani
inovramadani / mathCalculation.js
Created January 31, 2019 17:20
Javascript recursive function to do math calculation on string formula input
View mathCalculation.js
// recursive function to do math calculation on string formula input
// use case: mathCalculation("1 * 2 + 4 / 2 - 6")
function mathCalculation (formula) {
const plusOperator = '+'
const minusOperator = '-'
const multiplyOperator = '*'
const divideOperator = '/'
if (formula.indexOf(plusOperator) > 0) {