def can_make_identical(array_one, array_two, m):
diff = [array_two[i] - array_one[i] for i in range(m)]
start = end = -1
value = None
for i in range(m):
if diff[i] != 0:
if value is None:
value = diff[i]
if value < 0:
return False, len(set(array_one).intersection(array_two))
start = end = i
elif diff[i] == value:
end = i
else:
return False, len(set(array_one).intersection(array_two))
if start == -1:
return True, 0
for i in range(start, end + 1):
if diff[i] != value:
return False, len(set(array_one).intersection(array_two))
return True, value
m = int(input())
array_one = list(map(int, input().split()))
array_two = list(map(int, input().split()))
can_make, result = can_make_identical(array_one, array_two, m)
if can_make:
print(f"YES {result}")
else:
print(f"NO {result}")
diff = [array_two[i] - array_one[i] for i in range(m)]
start = end = -1
value = None
for i in range(m):
if diff[i] != 0:
if value is None:
value = diff[i]
if value < 0:
return False, len(set(array_one).intersection(array_two))
start = end = i
elif diff[i] == value:
end = i
else:
return False, len(set(array_one).intersection(array_two))
if start == -1:
return True, 0
for i in range(start, end + 1):
if diff[i] != value:
return False, len(set(array_one).intersection(array_two))
return True, value
m = int(input())
array_one = list(map(int, input().split()))
array_two = list(map(int, input().split()))
can_make, result = can_make_identical(array_one, array_two, m)
if can_make:
print(f"YES {result}")
else:
print(f"NO {result}")
Array similarity // nextwaveπ
Please open Telegram to view this post
VIEW IN TELEGRAM
def mex_number():
n = int(input())
arr = list(map(int, input().split()))
arr_set = set(arr)
mex = 0
while mex in arr_set:
mex += 1
for num in sorted(arr):
arr_set.remove(num)
new_mex = 0
while new_mex in arr_set:
new_mex += 1
if new_mex!= mex:
return 1
arr_set.add(num)
return -2
print(mex_number())
n = int(input())
arr = list(map(int, input().split()))
arr_set = set(arr)
mex = 0
while mex in arr_set:
mex += 1
for num in sorted(arr):
arr_set.remove(num)
new_mex = 0
while new_mex in arr_set:
new_mex += 1
if new_mex!= mex:
return 1
arr_set.add(num)
return -2
print(mex_number())
Mex num // nextwaveπ
Please open Telegram to view this post
VIEW IN TELEGRAM
def alpha(s):
r = 8
for c in s:
if c.isalpha():
r = r * 26 + (ord(c.upper()) - ord('A') + 1)
return r
print(alpha(input()))
r = 8
for c in s:
if c.isalpha():
r = r * 26 + (ord(c.upper()) - ord('A') + 1)
return r
print(alpha(input()))
Excel common // nextwaveπ
Please open Telegram to view this post
VIEW IN TELEGRAM
Get ready for FLIPKART SDE
ALL THE BEST π€β€οΈ
@codeicon_desk
Join the discussion group
Post your Questions?
ALL THE BEST π€
@codeicon_desk
Join the discussion group
Post your Questions?
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
Pilvo is hiring for SDET l
Remote Opportunity
CTC : 15 - 25 LPA
https://jobs.lever.co/plivo/838b3544-dc69-419a-9f95-187db440a37c/
Join Channel : @codeicon_desk
Remote Opportunity
CTC : 15 - 25 LPA
https://jobs.lever.co/plivo/838b3544-dc69-419a-9f95-187db440a37c/
Join Channel : @codeicon_desk
Please open Telegram to view this post
VIEW IN TELEGRAM
https://krb-sjobs.brassring.com/TGnewUI/Search/home/HomeWithPreLoad?PageType=JobDetails&partnerid=26059&siteid=5016&jobid=750310
Ibm back-end
Interview conduct by offline mode
Brassring
Software Developer -Backend - IBM Careers - Job Details
Job Details: As a key member of our dynamic team, you will play a vital role in crafting exceptional software experiences.
Revature
Test accomplished ππ―
McQ + essay+ coding+ SQL ππ―
π π»
Test accomplished ππ―
McQ + essay+ coding+ SQL ππ―
π π»
DM for any kind OAπ©
@Mrtrueliving_ix π©βπ»π©βπ» @Mrtrueliving_ix
GitLab is hiring Backend Engineer
2020, 2021, 2022 grads eligible
https://job-boards.greenhouse.io/gitlab/jobs/7479972002?lever-source=LINKEDIN&lever-origin=applied
2020, 2021, 2022 grads eligible
https://job-boards.greenhouse.io/gitlab/jobs/7479972002?lever-source=LINKEDIN&lever-origin=applied
Wissen Technology is hiring for Java Developer
Eligibility : 2024 passouts , CS/IT Btech/ Mtech , 7.5 CGPA or higher
Send your resume for referral to :
abhay.tripathi@wissen.com
Or
trupthi.shetty@wissen.com
Eligibility : 2024 passouts , CS/IT Btech/ Mtech , 7.5 CGPA or higher
Send your resume for referral to :
abhay.tripathi@wissen.com
Or
trupthi.shetty@wissen.com
π1
https://jobs.ubs.com/TGnewUI/Search/home/HomeWithPreLoad?jobid=306271&codes=ILINKEDIN&siteid=5012&partnerid=25008&PageType=JobDetails#jobDetails=306271_5012
Ubs
JAVA ReactJs (Software Engineer)
Are you passionate about building highly available, robust, and scalable distributed systems? Do you enjoy wor
Please open Telegram to view this post
VIEW IN TELEGRAM