Skip to main content

Questions tagged [computer-science]

Computer science or computing science (abbreviated CS or CompSci) is the scientific approach to computation and its applications.

Filter by
Sorted by
Tagged with
0 votes
1 answer
111 views

<Definition> ::= <Name> <LeftPar> <param> <RightPar> <Name> ::= <Letter><LetterTail> <LetterTail> ::= <Letter><LetterTail> | ‘’ A ...
User's user avatar
  • 11
0 votes
1 answer
240 views

I am reading the paper "Ethernet Goes Real-time: a Survey on Research and Technological Developments". In this paper, it says "Flow control can be implemented on a link-by-link or end-...
KSMoon's user avatar
  • 11
6 votes
2 answers
1k views

While I was learning functional programming I have encounterd two for me very similar terms: immutability and persistence. Also I have read simular questions from stackoverflow, but I am still ...
DimitrijeCiric's user avatar
0 votes
3 answers
221 views

Let's suppose we have this expression: (i % 1000000) * 1000 + ms where i is an always increasing number, and ms is the millisecond part of the current time ( ranging 0..999). So each time we are ...
Felice Pollano's user avatar
-1 votes
1 answer
255 views

I was searching about simulation of artificial intelligence, machine learning and subjects alike and saw the news that some startups around of the world are using analog computers to simulate ...
Fulano's user avatar
  • 117
0 votes
3 answers
464 views

I'm creating a very simple compiler PoC that only has Procedures Calls to procedures. The syntax of the language is really simple: Main { Call("Proc1"); } Proc1 { // Empty } I ...
SuperJMN's user avatar
  • 453
-2 votes
2 answers
155 views

I was reading about it and was thinking surely the queue first in first out system would make more sense than using a stack because the last instruction will become the first right because it's lifo?
frosssssbite's user avatar
1 vote
1 answer
453 views

In Operating System Concepts: 7.5.1 Safe State A state is safe if the system can allocate resources to each process (up to its maximum) in some order and still avoid a deadlock. More formally, a ...
Tim's user avatar
  • 5,555
0 votes
1 answer
2k views

I came across a problem: given an array (can be huge 10^8) and an integer, K, find the count of pairs in the array whose Xor equal to each value in the range 0 to K. eg: Arr = 1 2 3 K = 2 since K=...
Kalpish Singhal's user avatar
-2 votes
1 answer
130 views

When I was study lvalue i see that C expression can be lvalue if a subscript ([]) expression that does not evaluate to an array. (from https://docs.microsoft.com/en-us/cpp/c-language/l-value-and-r-...
Ulaş Sezgin's user avatar
-1 votes
1 answer
215 views

This is part of a bigger problem, which is to find out if point XYZ exists in any of n (XYZ -> XYZ) "boxes". I'm currently splitting up the problem into a smaller one, by focusing on one dimension ...
Shadowjonathan's user avatar
1 vote
3 answers
239 views

What time complexity would you classify the following as having? int n = 100; for(int x = 0; x < n; x++) for(int y = 0; y < n; y++) for(int z = 0; z < n; z++) DoWork(...
Eoin Campbell's user avatar
1 vote
1 answer
168 views

This is my first post here and I'm glad to join this great community and I hope to learn a lot here and help if I can(though i am a very beginner). I have a theoretical question: I am trying to add ...
csnoobie's user avatar
1 vote
3 answers
164 views

I was reading about "Referential Transparency" that says how to program thinking about purity and determinism. It's said that a function that modifies an outside state is unpure. But what about a ...
Isaac Ferreira's user avatar
-4 votes
1 answer
2k views

By theory please correct me if I am wrong, it says that an int can take upto max 4 bits in case of number 9. I haven't coded it low level languages but I assume that the datatype int in c and python ...
user avatar
2 votes
1 answer
487 views

I want to calculate the runtime of the following function T(n) = (1+2+3+4+5+...+n)/n At first this doesnt seemed hard to me because it can be solved easily by transforming the formula T(n) = (n(n-1)...
BudBrot's user avatar
  • 131
18 votes
1 answer
4k views

E.g. when comparing two integers as follows in a C-like language: if (3 > 2) { // do something } How is the judgement whether 3 is greater than 2 (true) or not (false) made internally?
Niek's user avatar
  • 307
4 votes
1 answer
405 views

In swift the compilation time is really slow the amount of code in your project increases. So i was looking for ways to reduce that time. One approach maybe is to use language keywords like final or ...
Mariano's user avatar
  • 57
3 votes
2 answers
210 views

At the moment I am developing three scientific software projects (computer vision) in parallel in Python and scratching my head about organization, clean code and easy extensible/to maintain code. ...
snowflake's user avatar
  • 153
0 votes
2 answers
2k views

Say we have an interrupt that is generated once each time that 1024 bytes of network traffic arrives. Each interrupt takes 3.5 microseconds to process and the network speed is 100Mb.We want the ...
user63210's user avatar
1 vote
1 answer
229 views

In JavaScript, you can have a loosely typed language. So doing the following is acceptable: var iterator = new TokenIterator(this.session, cursor.row, cursor.column); var matchType; var found = ...
1.21 gigawatts's user avatar
3 votes
3 answers
191 views

In certain programming languages, the meaning of certain names may be fully determined at compile-time (i.e. without running the program). Example: A function in C has global scope; when the name of ...
Klaas van Schelven's user avatar
1 vote
3 answers
652 views

I wanted to know how do people generically think of, in a data base table: Columns that people are expected to use mostly for grouping expectable of groupability. Columns that people are expected to ...
94239's user avatar
  • 6
2 votes
2 answers
997 views

For storing sparse matrices I know there are multiple formats that are common, like COO, CSR, DIA, ELL, HYB, etc. (Link to some storage formats), but I haven't found that any of these stores the ...
Veridian's user avatar
  • 123
1 vote
3 answers
782 views

I have come across a programming question in which I have to determine : Does there exists at least one pair in a given unsorted array such that |i - j| <= K and |A[i] - A[j]| <= x ? ...
Tushar Gupta's user avatar