Org: CNCF
Project: OpenEBS: Update mount-points and capacity of Block Devices without restarting NDM
Proposal: https://bit.ly/3D1qitD
Org: CNCF
Project: OpenEBS: Update mount-points and capacity of Block Devices without restarting NDM
Proposal: https://bit.ly/3D1qitD
package main | |
import ( | |
"log" | |
"os" | |
"syscall" | |
) | |
const mpath = "/proc/mounts" |
class Solution { | |
public: | |
bool canPartition(vector<int>& nums) { | |
int sum = 0, n = nums.size(); | |
for (auto a : nums){ | |
sum += a; | |
} | |
if(sum&1) | |
return false; |
#define SUM(i) (i >= 0 ? sum[i] : 0) | |
class Solution { | |
public: | |
int minSubArrayLen(int s, vector<int>& nums) { | |
int i = 0, j = 0, len = nums.size(), min_len = INT_MAX; | |
if(len == 0) | |
return 0; | |
int sum[len]; | |
sum[0] = nums[i]; | |
for(i = 1; i < len; i++) |
/** | |
* Definition for binary tree | |
* struct TreeNode { | |
* int val; | |
* TreeNode *left; | |
* TreeNode *right; | |
* TreeNode(int x) : val(x), left(NULL), right(NULL) {} | |
* }; | |
*/ | |
stack<TreeNode*> s; |
int Solution::black(vector<string> &A) { | |
int n=A.size(),m=A[0].size(),count=0,x,y; | |
queue<pair<int,int>> q; | |
for(int i=0;i<n;i++){ | |
for(int j=0;j<m;j++){ | |
if(A[i][j]=='X'){ | |
count++; | |
q.push(make_pair(i,j)); | |
while(!q.empty()){ | |
x=q.front().first; |
class Solution: | |
def singleNumber(self, A): | |
res=0 | |
count=0 | |
for j in range(64): | |
count = 0 | |
for i in A : | |
if 1<<j & i : | |
count+=1 | |
if count%3 != 0 : |
int pivot(const vector<int> &A){ | |
int l=0; | |
int r=A.size()-1; | |
int mid; | |
while(l<r){ | |
mid=(r-l)/2+l; | |
if(mid>l && A[mid-1]>A[mid]){ | |
return mid; | |
} | |
if(mid<r && A[mid+1]<A[mid]){ |
string s; | |
vector<string> ans; | |
void myFunc(int n,int o,int c){ | |
if(o+c==2*n){ | |
ans.push_back(s); | |
return; | |
} | |
if(o<n){ | |
s.push_back('('); | |
myFunc(n,o+1,c); |