Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
3 votes
1 answer
144 views

I’m currently learning about data structures and algorithms (DSA) by reading the book "Learning JavaScript Data Structures and Algorithms – 2nd Edition" by Loiane Groner. I am implementing the DSAs in ...
0 votes
0 answers
105 views

I'm looking for a Deque like data structure, but it's only responsible for prepending to the start in O(1) time. Since it wouldn't need to append to the end, it would simplify the responsibilities ...
0 votes
1 answer
102 views

The code below plots numbers received from serial port. However, the values of locals()[self.axes_mapping[axis]] are not all the received data from the function receive_data. It seems some values are ...
0 votes
1 answer
106 views

As part of a server application to run on macOS, I need to implement a thread-safe deque in order to feed jobs to a thread pool. I'm new to Swift. In C++ it would look like: class JobQueue { public: ...
Danny's user avatar
  • 2,711
4 votes
1 answer
473 views

I am trying to solve a sorting problem in which it would be useful to determine the longest increasing subsequence in a circular buffer. As an example, let's take the following sequence: 5, 3, 4, 2, 1 ...
0 votes
3 answers
200 views

I wanted to test if a deque<> does free its chunks if it is completely emptied: #include <iostream> #include <deque> using namespace std; uint64_t nAllocs = 0, nFrees = 0; void *...
3 votes
0 answers
150 views

If I need to pass a reference to an int immutably, I can pass it as a const int* to a function, as opposed to int*. This also helps the interface show that the pointed data won't be mutated. Now I ...
1 vote
0 answers
450 views

I learned this fact after reading Inside STL: The deque, implementation, and I am very shocked by it. 16 bytes!? That’s only twice the size of a pointer! I know that the major implementations of the ...
許恩嘉's user avatar
  • 1,331
0 votes
0 answers
37 views

This code creates a client class with variables name, arrival time, and delay. The loop creates new clients in a queue by reading their arrival time, adding a delay to it, and make it the arrival for ...
1 vote
1 answer
56 views

I have created a version that works for vectors, but I am currently at a standstill regarding how to adapt it to work with other types of matrices. I don't know if I should, and if I can give the ...
3 votes
0 answers
201 views

When compiling a C++ project in release mode with Visual Studio 2022 version 17.6.4 with the ‘Inline function expansion’ option set to /Ob2, i have found out that the std::sort() function for std::...
0 votes
0 answers
30 views

I am trying to code Round Robin scheduling algorithm in python3.10. But I kept getting this error, when i try to access elements of each list inside deque self.__ready_queue: Traceback (most recent ...
1 vote
0 answers
62 views

Is code like the following guaranteed to work, or is there undefined behavior? #include <deque> #include <cassert> int main() { std::deque<int> arr{1, 2, 3}; auto it = arr....
tmlen's user avatar
  • 9,242
0 votes
0 answers
25 views

CSV has 8000 rows. The code needs to pick up "n" rows (example: 1500) from the bottom of the csv, along with the header column names. The data from csv looks like this: Ticker Name Date Open ...
Vaibhav's user avatar
  • 123
2 votes
0 answers
62 views

In my function I need to rotate a VecDeque a certain amount of times, always in the same direction that depends on the input, with a value that never changes. So I started envisioning a solution like ...

15 30 50 per page
1
2 3 4 5
...
68

AltStyle によって変換されたページ (->オリジナル) /