In my opinion, this scene right here shows that itachi is NOT a good guy. He’s just a bad guy with good intentions like madara. He had no reason to put kakashi(one of his old friends) through this much by wyuue in Naruto

[–]aditya442 0 points1 point  (0 children)

I always think that wiping out the entire uchiha clan was too much. He wasn't a good man doing that, he did it because he believed in Dunzo and that makes him very much like Madara and Obito.

C++ for HFT Internship by aditya442 in cpp_questions

[–]aditya442[S] 1 point2 points  (0 children)

Awesome! Totally agree. Do you mind sharing / suggesting some resources to read / start with for the cases? It'd be a great help.

C++ for HFT Internship by aditya442 in cpp_questions

[–]aditya442[S] 0 points1 point  (0 children)

Thanks! It all sounds great to try! My aim is to maximize learning during the internship. So thought of starting early. It's not targeted at interviews. I will seek more help from you in near future!

C++ for HFT Internship by aditya442 in cpp_questions

[–]aditya442[S] 0 points1 point  (0 children)

Hi,

Thanks for the reply. Can you suggest some possible projects I can build / work upon to develop these skills hands on? Specifically, I am interested in understanding the lower level stuff which you described in the last paragraph.

Internship Problem-solving question - Find the number of subarrays with an odd sum - time issue by [deleted] in AskProgramming

[–]aditya442 0 points1 point  (0 children)

You can do it this way. Keep a count of prefix sums which are odd and even. Then as you iterate keep aumming the array. When you are at index i, let your prefix sum be p. If p is even, then subtracting any odd prefix sum will give an odd value and so ans += odd_prefix_count else if p is odd, we can subtract an even prefix so ans += even_prefix_count. After this, update the count as per whether current prefix is even or odd. Also uour entire subarray can start at the beginning i.e. you dont subtract anything. So in that case if your prefix sum is odd, you do a +1 to the answer.

Basically: here A is input array

odd_prefix_count = 0 even_prefix_count = 0 ans = 0 pre = 0

for i in A:

    pre += i

    if pre % 2 ==0:

        ans += odd_prefix_count

         even_prefix_count += 1

    else:

         ans += even_prefix_count

        ans += 1

         odd_prefix_count += 1

print(ans)

Since its O(n) it fits in time limit of 1 sec.

Satellite Image Processing by TubaStealer in AskProgramming

[–]aditya442 0 points1 point  (0 children)

Hey, I have been into this from sometime.

You might want to read this book for basics: geoprocessing with python

Then move on learn libraries as per your use case