This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cmd": ["gnome-terminal -e 'bash -c \"python3 -u $file;echo;echo Press ENTER to exit; read line\"'"], | |
"shell": true | |
} |