^\s*#.*$
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
#include <bits/stdc++.h> | |
#define ll long long | |
#define vll vector<long long> | |
#define vii vector<int> | |
#define vpi vector<pair<int,int> > | |
#define vpl vector<pair<ll,ll> > | |
#define pb push_back | |
#define mp make_pair | |
#define fi first | |
#define se second |
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
#include<stdio.h> | |
int waitingtimerobin(int * job, int * run, int n, int tq) | |
{ | |
int j, count, time, remain, flag = 0; | |
int wait_time = 0, turnaround_time = 0, rt[10]; | |
remain = n; | |
for (count = 0; count < n; c++) | |
{ | |
rt[count] = run[count]; | |
} |
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
#include<stdio.h> | |
int main() | |
{ | |
int cnt,j,n,t,remain,flag=0,tq; | |
int wt=0,tat=0,at[10],bt[10],rt[10]; | |
printf("Enter Total Process:\t "); | |
scanf("%d",&n); | |
remain=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
#include <iostream> | |
#include <vector> | |
using namespace std; | |
int main() { | |
int N; | |
cin >> N; | |
vector state(N); | |
vector distance(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
ctr ns ls ------ To list namespaces | |
ctr -n k8s.io containers list |
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
fullnameOverride: "" | |
nameOverride: "" | |
useStandardNaming: true | |
revisionHistoryLimit: ~ | |
uid: 50000 | |
gid: 0 | |
securityContext: {} | |
securityContexts: | |
pod: {} | |
containers: {} |
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
def find_largest_sum_cycle(n, edges): | |
def dfs(node, visited, stack, path_sum, cycle_sums): | |
visited[node] = True | |
stack[node] = path_sum | |
next_node = edges[node] | |
if next_node != -1: | |
if not visited[next_node]: | |
dfs(next_node, visited, stack, path_sum + next_node, cycle_sums) | |
elif stack[next_node] != -1: |
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
#include <iostream> | |
#include <vector> | |
#include <algorithm> | |
#include <unordered_map> | |
using namespace std; | |
void dfs(int node, vector<int>& edges, vector<bool>& visited, vector<int>& stack, int path_sum, unordered_map<int, int>& node_to_sum, int& max_cycle_sum) { | |
visited[node] = true; | |
stack[node] = path_sum; |
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
def max_subarray_cost(arr): | |
if not arr: | |
return 0 | |
max_sum = arr[0] | |
current_sum = arr[0] | |
for num in arr[1:]: | |
current_sum = max(num, current_sum + num) | |
max_sum = max(max_sum, current_sum) |
OlderNewer