#include <stdio.h>
#include <regex.h>
int isPowerOfTwo(const char *binaryString) {
regex_t regex;
int result;
result = regcomp(®ex, "^0*10*$", REG_EXTENDED);
if (result) {
printf("Could not compile regex\n");
return 0;
}
result = regexec(®ex, binaryString, 0, NULL, 0);
regfree(®ex);
if (!result) {
return 1;
} else {
return 0;
}
}
int main() {
int t;
char binaryString[1000];
scanf("%d", &t);
while (t--) {
scanf("%s", binaryString);
if (isPowerOfTwo(binaryString)) {
printf("True\n");
} else {
printf("False\n");
}
}
return 0;
}
Nvidia regex
Please open Telegram to view this post
VIEW IN TELEGRAM
string largestMagical(string binString) {
if (binString.empty()) return binString;
vector<string> ans;
int cnt = 0, j = 0;
for (int i = 0; i < binString.size(); ++i) {
cnt += binString[i] == '1' ? 1 : -1;
if (cnt == 0) {
ans.push_back("1" + largestMagical(binString.substr(j + 1, i - j - 1)) + "0");
j = i + 1;
}
}
sort(ans.begin(), ans.end(), greater<string>());
return accumulate(ans.begin(), ans.end(), string{});
}Nvidia largestmagical
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
WhatsApp.com
๐ฎ๐ณ</>Code_icons๐จโ๐ป๐ฏโข | WhatsApp Channel
๐ฎ๐ณ</>Code_icons๐จโ๐ป๐ฏโข WhatsApp Channel. Welcome family ๐ช๐ค
Every fresher deserves a chance to riseโจ
Led by :https://t.me/mrtrueliving_ix
Telegram: https://t.me/jobUpdatesclub
Help proofs:https://t.me/code_alphix
https://t.me/codeicons_hiring
https:/โฆ
Every fresher deserves a chance to riseโจ
Led by :https://t.me/mrtrueliving_ix
Telegram: https://t.me/jobUpdatesclub
Help proofs:https://t.me/code_alphix
https://t.me/codeicons_hiring
https:/โฆ
โค1๐1๐1
COGNIZANT EXAM HELP GROUP pinned ยซโญ ACCENTURE Interview Experience โญ 1) Intro. 2) OOPS concepts. 3) Wap to find the perfect square of a number in array. 4) DBMS. 5) Why wanted to join tech Mahindra. 6) SQL.. 7) Final year project.. 8) Your role.. 9) And 1-2 more questions...I forgot.โฆยป
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
def toolchanger(tools, start_index, target):
n = len(tools)
target_index = -1
for i in range(n):
if tools[i] == target:
target_index = i
break
right_moves = (target_index - start_index + n) % n
left_moves = (start_index - target_index + n) % n
return min(right_moves, left_moves)
Tool changer
Please open Telegram to view this post
VIEW IN TELEGRAM
Kickdrum both codes are available ๐
@mrtrueliving_ix
@mrtrueliving_ix
๐ฏ Verfied codes Only availableโถ๏ธ โค๏ธ
@mrtrueliving_ix
@mrtrueliving_ix
๐ฏ Verfied codes Only available
Please open Telegram to view this post
VIEW IN TELEGRAM
Successfully cleared Cognizant{ communication}๐
Check your mails โ
DM FOR OA { ๐ฏ TEST CLEARANCE}
@MRTRUELIVING_IX
@MRTRUELIVING_IX
Check your mails โ
DM FOR OA { ๐ฏ TEST CLEARANCE}
@MRTRUELIVING_IX
@MRTRUELIVING_IX
Please open Telegram to view this post
VIEW IN TELEGRAM
OA HELP AVAILABLE โถ๏ธ
๐ค Infosys
๐ค IBM -CIC
๐ค Accenture - ON campus
๐ค Accenture -OFF campus
๐ค De shaw
๐ค Swiggy FE & BE
๐ค COGNIZANT
๐ค Wipro
Any Other OA (off / on campus}
@mrtrueliving_ix
@mrtrueliving_ix
@mrtrueliving_ix
Remote access ๐ฏ test Clearance ๐ค
Any Other OA (off / on campus}
@mrtrueliving_ix
@mrtrueliving_ix
@mrtrueliving_ix
Remote access ๐ฏ test Clearance ๐ค
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Infosys On campus help done ๐
All MCQS+ essay are done โถ๏ธ
DM for Any Exam help
@MRTRUELIVING_IX
@MRTRUELIVING_IX
All MCQS+ essay are done โถ๏ธ
DM for Any Exam help
@MRTRUELIVING_IX
@MRTRUELIVING_IX
ALL PLACEMENT HELP AVAILABLE
import math
def largestAdjacentLCM(arr):
lcm = lambda x, y: abs(x*y) // math.gcd(x, y)
return max(lcm(arr[i], arr[i+1]) for i in range(len(arr) - 1))
UST
Please open Telegram to view this post
VIEW IN TELEGRAM
IBM -CIC HELP AVAILABLE
DM @MRTRUELIVING_IX ๐ฏ
Test Clearanceโถ๏ธ โค๏ธ๐ฏ
Prev
https://t.me/code_alphix/3851
https://t.me/code_alphix/3118
https://t.me/code_alphix/2249?single
#IBM #ONCAMPUS #TestClearance ๐
DM @MRTRUELIVING_IX ๐ฏ
Test Clearance
Prev
https://t.me/code_alphix/3851
https://t.me/code_alphix/3118
https://t.me/code_alphix/2249?single
#IBM #ONCAMPUS #TestClearance ๐
Please open Telegram to view this post
VIEW IN TELEGRAM
Deloitte ON campus help available
@MRTRUELIVING_IX
@MRTRUELIVING_IX
Preview:
https://t.me/code_alphix/2723
https://t.me/code_alphix/2314?single
๐ฏ TEST CLEARANCEโถ๏ธ โ๏ธ
#Deloitte #NLA #ONCAMPUS
@MRTRUELIVING_IX
@MRTRUELIVING_IX
Preview:
https://t.me/code_alphix/2723
https://t.me/code_alphix/2314?single
๐ฏ TEST CLEARANCE
#Deloitte #NLA #ONCAMPUS
Please open Telegram to view this post
VIEW IN TELEGRAM
Netcore๐ Back end developer
// Both codes are done๐ฑ
Test accomplished๐
OA HELP AVAILABLE:
@MRTRUELIVING_IX
@MRTRUELIVING_IX
๐ฏ TEST CLEARANCE๐
#NetCore #SD #Coding #round 1
// Both codes are done
Test accomplished
OA HELP AVAILABLE:
@MRTRUELIVING_IX
@MRTRUELIVING_IX
๐ฏ TEST CLEARANCE
#NetCore #SD #Coding #round 1
Please open Telegram to view this post
VIEW IN TELEGRAM