All Questions
Tagged with algorithm-analysis python
5 questions
0
votes
2
answers
363
views
fastest way to find number of smaller elements to the right of an array
In Daily Coding Problem, Miller&Wu have the following problem :
Given an array of integers, return a new array where each element in the new array is number of smaller elements to the right of ...
5
votes
4
answers
641
views
Processing a 2D matrix - need to speed up my O(n^4) algorithm
I have an n x n matrix which I need to convert into a list sorted by value. Starting with the maximum value cell at (row x1, col y1), I must immediately exclude all cells where (x >= x1, y <= y1)...
0
votes
1
answer
876
views
Battery level prediction model
I have the idea of develop a model that predicts the battery charge level of my system for now until the following 5 days. The battery is charged using a solar panel. I am writing my code in Python 2....
0
votes
3
answers
2k
views
Best algorithm to determine whether two arrays can be the same in a circular queue
I'm trying to figure out an efficient way to determine whether two distinct arrays of the same size can be shifted to form the same circular queue. For example:
Array1 = ['A','B','C','D']
Array2 = ['...
3
votes
4
answers
8k
views
Check distance between all elements in a list of numbers in O(n*lg(n))
I have an exercise for my algorithms and data structures class, where I basically have to implement a divide and conquer algorithm or function called check_distance to determine whether all numbers in ...