Skip to content

Instantly share code, notes, and snippets.

View baajarmeh's full-sized avatar

Basel Ajarmah baajarmeh

  • developing a new AI project...
  • Ajjur, Palestine
View GitHub Profile
@baajarmeh
baajarmeh / cpp.std.coroutines.draft.md
Created March 1, 2022 10:44 — forked from MattPD/cpp.std.coroutines.draft.md
C++ links: Coroutines (WIP draft)
@baajarmeh
baajarmeh / Go Cheat Sheet.md
Created March 14, 2021 19:15 — forked from ikennaokpala/Go Cheat Sheet.md
Go Cheat Sheet

Go Cheat Sheet

Credits

Most example code taken from A Tour of Go, which is an excellent introduction to Go. If you're new to Go, do that tour. Seriously.

Go in a Nutshell

  • Imperative language
@baajarmeh
baajarmeh / AmazonSolution2.java
Last active October 27, 2018 15:53
Amazon Problem 2 for OptimalUtilization
import java.util.*;
import java.util.stream.Collectors;
public class AmazonSolution2 {
List<List<Integer>> optimalUtilization(int deviceCapacity,
List<List<Integer>> foregroundAppList,
List<List<Integer>> backgroundAppList) {
List<List<ComplexCapacity>> foundCapacities = new ArrayList<>();
foregroundAppList.forEach(forApp -> foundCapacities.add(getMemUsage(forApp, backgroundAppList)));
List<List<Integer>> exactCapacity = new ArrayList<>();
@baajarmeh
baajarmeh / AmazonSolution1.java
Created October 27, 2018 15:50
Amazon Problem 1 for ClosestXDestinations
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
public class AmazonSolution1 {
List<List<Integer>> ClosestXdestinations(int numDestinations,
List<List<Integer>> allLocations,
int numDeliveries) {
@baajarmeh
baajarmeh / 0_reuse_code.js
Created January 17, 2016 08:56
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console