Skip to main content

Questions tagged [stack]

A stack is a last in, first out (LIFO) abstract data type and data structure. For questions about the assembly call stack, use [stack-memory], [stack-pointer], and/or [stack-frame] instead. For questions about the Haskell build tool, use [haskell-stack] instead. For questions about C++ std::stack, use [stdstack] instead.

stack
0 votes
2 answers
34 views

Implementing a Stack in Python: Problem with the POP function

I'm trying to implement the Stack Data Structure in Python from scratch. Unfortunately, I have a problem with the pop functionality. The pop function should delete the top element of the stack. ...
S.A.D.'s user avatar
  • 1
0 votes
1 answer
60 views

Why is there random stuff in my string when printing its bytes?

I'm trying to see how format string bug works and tried to explore it by myself. This is a simple program: #include"stdio.h" #include"string.h" struct mystruct{ char buf[32]; ...
Mateusz's user avatar
  • 11
-4 votes
0 answers
50 views

stack data structure in C [closed]

What is the best way to create a stack data structure in C, with array or with linked list(and if your answer is with linked list, please make it clear why), thankss I'm doing my 42 school project, ...
Yenoq's user avatar
  • 1
0 votes
0 answers
14 views

Stacktraces : how to identify the script (when using dynamic scripts)?

Let's say we have 2 dynamic scripts, generated locally, e.g.: const scripts = [ "console.log(new Error().stack)", "console.log(new Error().stack)" ]; We can run them in ...
Denis Migdal's user avatar
-4 votes
0 answers
32 views

How can I start my project on Algorithm Visualiser? [closed]

I need a bit of help from you all coders. I want to build a web application that visualizes algorithm like stack, queue, etc and I want to know the stuffs (skills), I need to get ready for it. Can ...
Prathamesh Patil's user avatar
0 votes
1 answer
35 views

R ggplot and exceeding stack size

I am using R to display some polygons on a map. Polygons are stored in a geoJson file and there are many of them (around 1000). In some geojson files may be even much more. Here is the R program ...
nobody's user avatar
  • 136
1 vote
1 answer
37 views

How to manage Activity stack behavior in Android based on dynamic IDs?

I have one ActivityA that contains a specific ID in the intent data, one ActivityB that is open from this ActivityA, and ActivityB can also open the same ActivityA with the same ID or a different one. ...
Lennon Spirlandelli's user avatar
0 votes
0 answers
21 views

Compiling project errors within a docker container targeting linux/amd64

I've been developing a side project (a small web app). I'm developing on a Macbook M1 Pro, however, I need to compile it to test against a linux/amd64 environment. I'm trying to use docker for that. I ...
bitmaybewise's user avatar
0 votes
1 answer
21 views

How do I return a list of letters when I input integers into a stack in a python?

I am currently learning python and I am struggling to complete the following task I need to input integers into a stack and convert these to capital letters. I have tried a few variations of the code ...
Sheri Milan's user avatar
0 votes
0 answers
36 views

Can a kernel memory address indicate its type of allocation?

I'm troubleshooting some Linux kernel code, and it would be nice to know where the memory pointer allocation originated. Question: Are there Linux kernel macros available like ADDR_IS_STACK_ADDR(ptr) ...
KJ7LNW's user avatar
  • 1,801
3 votes
4 answers
134 views

sorting algorithm in O(n) according a specific condition

Given an array A with n−1 numbers where n = 2^k for some integer k. One of the values appears exactly n/2 another appears exactly n/4, and so on. More formally, for all 1 ≤ k ≤ log n exists a value ...
GuyNet's user avatar
  • 31
-1 votes
1 answer
44 views

Does stack work differently in assembly than how it works in C?

I just started learning assembly code. As far as I understand, when a functions calls in assembly code, the main variables are stored to stack from registers and stored back to registers after ...
uykb's user avatar
  • 11
1 vote
2 answers
43 views

How to Perfectly Positioned the Widgets on every screen size

How to perfectly Positioned the widgets on screen which will perfectly fits on every screen size. I want to achieve this design. It is designed by the designer and I want to implement it in flutter I ...
Metasense Development's user avatar
0 votes
1 answer
65 views

How to understand how StackTraceElement works?

I'm very new to programming. I try to learn from Code Gym. But I still don't understand some things. For example, why is it crucial to put StackTraceElement[]... in last method on the chain in order ...
CodingNoob98's user avatar
1 vote
1 answer
75 views

How to store items in the LIFO stack in a cache-friendly manner?

EDIT / DISCLAIMER: It appears that my understanding of cache lines was wrong which makes this question not relevant and misleading. I thought whenever CPU tries to fetch a memory at a specific index, ...
i like bananas's user avatar

15 30 50 per page
1
2 3 4 5
739