Does time complexity of xoring 2 numbers increases exponentially as they grow in python?

Revision en1, by vishwas_007, 2022-02-26 19:20:34

Hi people, I just learnt about segment tree and did this problem. It involves alternate OR and XOR operations to obtain final result. My python solution(time complexity -> O(nlogn)) runs fine with smaller number in the array(see Test: #7) but as the numbers grow, I am getting TLE. Can anyone tell, how I can overcome this?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English vishwas_007 2022-02-26 19:20:34 518 Initial revision (published)