## Algorithm New Question

• ### function that solves operator precedence

I have a problem that I can't wrap my head around.My input is a flat list like this: (and I can tell what's the next operator, and what's the next element)element, operator, element, operator, ......

• ### How to reconnect an edge between nodes and get the

There is a graph. You can look at first picture. The graph is not directed and let's say that distance between nodes is always 1 here. However, distance can be different.So, the path of maximum ......

• ### Why DP solution for “Maximum Points You Can

Given this problem:There are several cards arranged in a row, and each card has anassociated number of points The points are given in the integer arraycardPoints.In one step, you can take one ......

• ### How to get maximum height of piled boxes?

There are set of 20 boxes with parameters {height, length, width}.One box can be piled on another if its {length_of_first, width_of_first} is less or equal than {length_of_second, width_of_second}, i.......

• ### A dp questions involving probability [closed]

8-14.  The traditional world chess championship is a match of 24 games. The currentchampion retains the title in case the match is a tie. Each game ends in a win, loss,or draw (tie) where wins ......

• ### Using FFT to find all possible sum [closed]

Given array A[] and B[], to find how frequently each possible sums A[i] + B[j] appears we can use FFTFor exampleA = [1,2,3], B = [2,4].The sum 3 can be obtained in 1 way, sum 4 : 1 way, sum 5 : 2 ......

• ### Solving Hamming Distance of n bit-string with FFT?

Given n different bit strings, each one of them has the same lengthEx:110111100001101000001000Calculate the minimum hamming distance between any two strings.I know how to do it with just two ......

• ### Modify multiple weighted sorting for newcomers in

I have implemented an multiple weighted sorting method in a photographer booking project (learning project) for recommendation purpose.The main idea is to order the photographers from best to worst ......

• ### Amortized Time with Hash Table

I solved the first part of the question but stuck at the second part.I have an elevator and want to support the following:Init() Set the elevator to start from floor 0 and its travel direction to be ......

• ### Weighted running linear regression algorithm?

There are algorithms to compute (or estimate) a "running" or incrementally updated linear regression. See: https://stats.stackexchange.com/questions/23481/are-there-algorithms-for-computing-......

• ### How to derive the worst case time complexity of He

I would like to know how to derive the time complexity for the Heapify Algorithm for Heap Data Structure.I am asking this question in the light of the book "Fundamentals of Computer Algorithms&......

• ### Heap using double linked list

Suppose one wants to implement a Max Heap using a doubly linked list. Canone achieve the same complexity for the operations Insert, ExtractMaxHeap and MaxHeapify using a doubly linked list as ......

• ### Is there an algorithm out there for creating a lim

For a school project I'm looking to create random examples of connected branches of clusters of nodes that don't overlap as per the picture. But imagine 50,000 or more of these connected clusters.Can ......

• ### Merge two Binary search trees

Let A1 and A2 be two BST (Binary Search trees) such that every key in A1 is smaller than every key in A2. You are given two pointers a1 and a2 to the roots of A1 and A2, respectively. Devise an ......

• ### How to draw a line by pixels?

I've got some idea, but for example if the starting point is at {0; 0} and end point is {8; 13} then at the end there would be a straight line of ~5 pixels, if I'm not mistaken, has anyone got any ......