How to optimize the code that finds the maximum sum of elements within a sub-rectangle (contiguous block) of a 2D array?
I have working code that finds the maximum sum of elements within a sub-rectangle of a 2D array. I’m wondering if there are any optimization techniques I could use to improve its performance.
Lock Free Queue, any problems with this
QueryWorker is a Class and QueryWorker.Next is a QueryWorker Field
This will Enqueue the Writer and put it last in line.
Returns true if you are the first in line.
Advanced algoritm in C# [closed]
Closed 1 min ago.
Algorithm to extract overlapping range
Have an array of Pressures (hundreds) initialized like this:
Lambda Calc Interpreter — Y Combinator Question
I’m trying to write (for the fun of it) a Lambda Calculus interpreter. So far, I can
Add, Mult, and do Exponentiation using Church numbers.
Is there an algorithm for placing text objects without overlap?
I have a set of drawn round polygons (Testpoints) and I would like to label each Testpoint with its coressponding name. The location of the Testpoints and its’ coressponding name are stored in an excel sheet. The names are then text objects that will be drawn on the same layer as the Testpoints.
a variable disappears for an unknown reason
#include<stdlib.h> #include<stdio.h> #include<string.h> #include<ctype.h> #define I 27 #define IR 25 #define File “test.txt” struct customer { long long identity; char iban[I]; int money; }; void filesave(struct customer cus) { FILE *file; file = fopen(File,”a”); if (file==NULL) { printf(“the file did not open properly.”); } fprintf(file,”%lld %s %d n”,cus.identity,cus.iban,cus.money); fclose(file); } int identitycontrol(long long identity) { […]
I have a problem with Contains duplicate problem in neetcode
I wrote this code to solve contain duplicate problem on neetcode but it failed in 2 test cases :
Improve valid pairs algorithm time complexity
I was solving a task:
Url parsing task in contest
I was solving the task to parse Url string into parts: