Skip to content

Instantly share code, notes, and snippets.

View vermaditya1999's full-sized avatar

Aditya Verma vermaditya1999

  • New Delhi
View GitHub Profile
@vermaditya1999
vermaditya1999 / projects.cpp
Last active July 16, 2019 11:17
Projects [CodeNation]
/* QUESTION
* N employees are given, you have to divide them into teams of two.
* If n is odd the last person will form a one man team.
* Problem is all employees are not compatible with each other and if both are compatible with each other then only a team can be formed.
* Aij ='C' if employee i is compatible with employee j, Aij = 'X' otherwise.
* Aii ='C' if employee i can work as one man team, Aii = 'X' otherwise.
* find the maximum no of valid teams that can be formed. constraints: T <=20, N<=18.
*/
#include <bits/stdc++.h>
@vermaditya1999
vermaditya1999 / ForkJoinPoolFibonacci.java
Last active November 18, 2018 06:45
RecursiveAction Benchmarking
import java.util.concurrent.ForkJoinPool;
import java.util.concurrent.RecursiveAction;
public class ForkJoinPoolFibonacci extends RecursiveAction {
private int n;
private int result;
public ForkJoinPoolFibonacci(int n) {
this.n = n;
@vermaditya1999
vermaditya1999 / text
Created November 17, 2017 19:09
Sublime Text, Custom build system for python3-linux
{
"cmd": ["gnome-terminal -e 'bash -c \"python3 -u $file;echo;echo Press ENTER to exit; read line\"'"],
"shell": true
}