Skip to content

Instantly share code, notes, and snippets.

View mushifali's full-sized avatar
🎯
Carpe diem!

Mushif Ali Nawaz mushifali

🎯
Carpe diem!
View GitHub Profile
@mushifali
mushifali / 1-setup.md
Created August 16, 2022 15:07 — forked from troyfontaine/1-setup.md
Signing your Git Commits using GPG on MacOS

Methods of Signing with GPG on MacOS

Last updated June 23, 2022

There are now two ways to approach this:

  1. Using gpg and generating keys
  2. Using Kryptonite by krypt.co

This Gist explains how to do this using gpg in a step-by-step fashion. Kryptonite is actually wickedly easy to use-but you will still need to follow the instructions

@mushifali
mushifali / CoinProblem.java
Created April 29, 2018 18:21
This is Coin Change Implementation in Java using Recursion and Dynamic Programming
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
public class CoinProblem {
public static void main(String[] args) {
System.out.println(countMakeChangeCombinations(new int[]{1, 2, 5}, 7));
System.out.println(countMinimumChangeCoins(new int[]{1, 2, 5}, 7));
}
@mushifali
mushifali / AlgorithmImpl.java
Created April 26, 2018 16:07
This is Binary Search Implementation in Java
/**
* @author Mushif Ali Nawaz
*/
public class AlgorithmImpl {
public static void main(String[] args) {
String[] names = {"Ahmed", "Aslam", "Mushif", "Shakeel", "Waqas"};
int index = AlgorithmImpl.binarySearch(names, "Shakeel");
System.out.println("For Shakeel: Binary Search returned " + index + " index.");
index = AlgorithmImpl.binarySearch(names, "Shahid");