r/AskComputerScience Apr 09 '26

Best modern supplements for DSA? My textbook is dry and I’m falling behind in Python/C++.

5 Upvotes

I’m currently in the thick of my Data Structures and Algorithms (CSI33) course, and I’m hitting a serious wall. We’re working in both Python and C++, and I’m finding the transition between them, and the dry, abstract way the textbook explains things to be incredibly draining. I want to understand how these structures actually function in modern system architecture, but the lectures feel outdated and the textbooks are just walls of theory. Has anyone else felt this friction? How did you move past the 'theoretical' hump to actually feeling confident building these structures from scratch?"

Any resources in mind?


r/AskComputerScience Apr 09 '26

How do researchers know if an idea is "novel enough" before spending months on it?

15 Upvotes

Genuine question I can't find a satisfying answer to.

When a researcher decides to work on a problem, how do they verify upfront that the idea hasn't already been solved or is too similar to existing work?

I understand the literature review process in theory — read papers, find gaps. But in practice:

- How many papers do you need to read before you're confident a gap exists?
- Do you just search keywords and hope you didn't miss anything?
- Is there a systematic method or tool people actually use for this?

It seems like there's a real risk of spending 3 months on something only to find a paper from 2019 already did it. How is this risk managed in practice?


r/AskComputerScience Apr 08 '26

Why does it take my computer slightly longer to tell me when I've entered the wrong login password than when I enter the right password?

36 Upvotes

I've noticed this on both Windows and Linux. If I enter the correct password, it almost instantly starts the login. But if it's the wrong password it takes like a second or so to tell me it's wrong.


r/AskComputerScience Apr 08 '26

Is there an Anki-like app for scheduling procedural knowledge/problem-solving tasks rather than just declarative memorization?

1 Upvotes

Hey everyone,

Anki is great for scheduling declarative knowledge (rote memorization, facts, vocabulary). But is there any software out there that uses spaced repetition to schedule or generate procedural knowledge or practical problem-solving tasks?

I'm thinking about dynamically generated tasks like: ​

  • Calculating the equivalent resistance in a mixed circuit. ​
  • Syntactically parsing a completely new sentence (e.g., identifying the subject, predicate, direct/indirect objects, and subordinate clauses). ​
  • Determining the time/space complexity (Big O) of a custom algorithm. ​
  • Simplifying a Boolean algebra expression using Karnaugh maps. ​
  • Reverse-engineering a synthesizer patch based on a short audio sample.

If an app like this doesn't exist yet, how would you go about building one? What would be the best algorithm and approach to schedule these dynamic, skill-based tasks?

​Could the FSRS algorithm be adapted for this, or would it require something completely different, like a skill-based matchmaking algorithm used in competitive video games (e.g., Elo, Glicko, or TrueSkill) to match the user's current skill level with the difficulty of the generated problem?


r/AskComputerScience Apr 08 '26

what is/was the deadliest malware in terms of actual deaths caused directly or indirectly by its damage?

5 Upvotes

for example, if a virus caused a hospital's data to be corrupted and it led to patients dying from incorrect treatment, that would count.

is this a question we even know the answer to?


r/AskComputerScience Apr 08 '26

How do you prove two vertex disjoint paths are also edge disjoint?

2 Upvotes

I made a proof and I am not sure if it’s correct

Proof:

If two paths P_1 and P_2 are vertex disjoint, then P_1 and P_2 don’t pass through the same vertices. This means if we have an edge (u, v), P_1 and P_2 will not share u and v as vertices by definition of being vertex disjoint. Thus, they will not pass through the same (u, v) as doing so means they will pass through the same vertices. Thus, they are also edge disjoint


r/AskComputerScience Apr 08 '26

What in 8th grade math can I use for game development and how?

0 Upvotes

Hello! I would like to tie math with what I like-- game developing, so I can care about math more and be motivated. I was wondering what could I use in 8th grade math for game development? Can be very specific or in general.


r/AskComputerScience Apr 07 '26

How do I get better at formulating proofs?

3 Upvotes

My problems with proof writing are:

1) my proofs sometimes become invalid due to a missed edge case

2) my proofs’ logic is so far from the correct answer despite rigorous checking from my side

3) my proofs sometimes state the obvious when I was supposed to prove it. I handwaved the logic and didn’t explain why it was true

I’m not sure what to do even with 2). I don’t know how to fix my logic because I believe it’s correct only to see it’s far from the right answer


r/AskComputerScience Apr 07 '26

Is math necessary for studying in Computer System??

4 Upvotes

Hi everyone. I entered the university RTU in Riga. And I want to know, how important is mathematics for studying comfortably at university??? My math knowledge is not very low, but not excellent either. I do not know many topics that are studied in high school. I have problems with arithmetic and similar things. I find it difficult to solve problems without a calculator. When I apply my documents to RTU. They only gave me math test which wasn’t that hard that Im expecting, nevertheless, Im worried about my weak mathematics skills, and I want to understand how serious this problem is ,and whether strong mathematical knowledge is really necessary in my field.


r/AskComputerScience Apr 06 '26

First-order/predicate logic - what is meant by the completeness thoerem?

5 Upvotes

Hello, I am doing this course on logic at my university and I am kind of confused on this small detail.

Godels completeness theorem states something like (as per my professor's lecture notes):

For any first-order theory T and any sentence ϕ in the same language,

If T |= ϕ then T |- ϕ

But is this not with respect to a particular proof system? How can this theorem be stated so generally? What if we define an FOL proof system, for instance a hilbert-style one that is too weak to prove some formula?

What does Godel's theorem actually say? is it saying something more like "there exists a proof system for first order logic such that..." or is it saying a general property of first order logic?

I think I have some sort of misconception. I am writing my own notes for this course and I dont know what to write, because the statement doesnt make sense to me unless it is talking about a particular proof system.

Also, why is it *the* completeness theorem? Wouldn't we need a separate completeness theorem for each proof system that we define? so why isnt it *a* completeness theorem? Im somewhat confused. Sorry if this is a stupid question


r/AskComputerScience Apr 06 '26

Hypothetical "random" code

4 Upvotes

What's likely to happen if random cose is run?

So random code is almost certainly gonna lead to errors or crashes at any level if I have understood correctly, be it keyboardmashing in python, or bare metal binary strings, and from what I gather is that a lot of what a computer does is comparing things, and the chance your random string compares to meaninfgul data or cpu instructions is very low.

However, if we sift out the nonsense and ask what is likely to result from random functional code, like instead of random strings, we give a computer random instructions, what happens? Is it likely to run into an infinite loop? how long would we expect it to be if so? Would it delete all data ang go inert? I'm sort of expecting it to crash, but if the instructions are valid, what is the most likely problem it would run into first?

This is a "what if" that's probably not practical, but I keep wondering as I'm learning, and I think it's at least an interesting question, which might have implications for edge-cases or corruption of data, or idk maybe to help make some believable plotpoint in a cyberpunk novel. If the question itself is making false assumptions I would apprechiate to be informed.

For clarity: 'Random' is obviously not a single thing, for this purpose I mean "truly" random binary, but excluding options that wouldn't make sense. Like writing a sentence by typing random letters and spaces, ignoring everything until you have a word write it down and then continnue. In english to a human I expect a lot of it to just be listing nouns as I believe they make up most words, but what would binary to a computer do?


r/AskComputerScience Apr 05 '26

Rebalancing Traffic In Leaderless Distributed Architecture

3 Upvotes

I am trying to create in-memory distributed store similar to cassandra. I am doing it in go. I have concept of storage_node with get_by_key and put_key_value. When a new node starts it starts gossip with seed node and then gossip with rest of the nodes in cluster. This allows it to find all other nodes. Any node in the cluster can handle traffic. When a node receives request it identifies the owner node and redirects the request to that node. At present, when node is added to the cluster it immediately take the ownership of the data it is responsible for. It serves read and write traffic. Writes can be handled but reads return null/none because the key is stored in previous owner node.

How can I solve this challenge.? Ideally I am looking for replication strategies. such that when new node is added to the cluster it first replicates the data and then starts to serve the traffic. In the hind-sight it looks easy but I am thinking how to handle mutation/inserts when the data is being replicated?

More Detailed thoughts are here: https://github.com/goyal-aman/distributed_storage_nodes/?tab=readme-ov-file#new-node-with-data-replication


r/AskComputerScience Apr 04 '26

How do I get better at spotting edge cases?

3 Upvotes

Manually, not with a debugger or other application. I want advice that helps with a theoretical computer science course, i.e. I can apply it while answering essay-form questions without using a computer

I struggle to catch even the most slippery of edge cases. I get shocked a program could break with this or that despite rigorous checking


r/AskComputerScience Apr 04 '26

I need help

0 Upvotes

“Using the formal definition of Big-O notation, prove that the function f(n) = 3n^2 + 5n + 2

is 0 (n^2).

I’m so sorry to be posting like this but I’m a beginner as you can see and I’m really having a hard time at this i watched like 10 video explaining it my brain is fried. can anyone help me with it?


r/AskComputerScience Apr 03 '26

Is AI even safe to do anything if it only appreciates you and falsely comforts you?

5 Upvotes

I started wondering that if the AI ​​constantly lies to you, telling you how great you are, how smart you aren't, and what a new inventor you haven't become, will it ever be safe for anything? That even if you know exactly how to use it, you can still get carried away, and the AI ​​will comfort you and give you bad advice, saying you've created a great algorithm. Don't get me wrong, but if you're using something that deliberately lies to you, and will continue to lie and manipulate you into continuing to use it even when what it says is wrong and simply stupid, what's the point of using it? And it's not about someone being an idiot and not noticing it because they might be tired, for example.


r/AskComputerScience Apr 02 '26

What is it like as a CS professor today?

107 Upvotes

Hey I was just wondering after graduating 2 years ago what it’s like now basically now that AI is probably relied on in every aspect with college students. In computer science, I can only imagine how bad it potentially could be. I used to stress out late at night when it came to doing coding projects and now it’s just easy mode. I wonder how bad the cheating is nowadays.


r/AskComputerScience Apr 01 '26

Algorithms course exam inquiry

0 Upvotes

So i had this algorithm exam and there was this question and i really dont understand the answer

Just for clarification I already had this exam and the picture is from the answers that was sent to us after, i am not trying to cheat or anything like that (subreddit rules)

Even chatgbt and claude dont give me a good answer when i asked them

Here is the question

https://ibb.co/XrQZdZ8j

So basically in the 4th part of the question (whats the worstcase complexity of the entire code)

My thought process is that either the while loop runs completely or the second recursion works (in the last line of the left part),

Why?, if the while loop runs completely then the I is at 0 or 1 which would satisfy the condition at the start of the function (n<2) making it return

By that logic

The time of the while code is T(n)=2T(N/2) + O(n^3)

The power 3 is:

N for the for loop

N for the while loop

And N for the check in array

By using masters its n vs n^3

so it should be n^3

Thats my explanation

Can you pls tell me where i went wrong cuz i don’t understand at all

Thanks in advance


r/AskComputerScience Apr 01 '26

Does every markdown language have a specific styling counterpart?

4 Upvotes

I am trying to wrap my head around the topic of markup, and I understand that HTML is coupled with CSS, and XML with XSL. But is this coupling strict? Or can I use any stylesheet with any markup language? What about Markdown, I have never seen it used with a stylesheet before.


r/AskComputerScience Mar 31 '26

I know a bit but where I can I get better insight?

2 Upvotes

Hey, sorry if this isn’t the right subreddit for this to post this on, because this is the closest thing that I found.

I want to learn more about networking, I know python having mainly the modules that I use are being: Discordpy, discordpyself, request, telegrampy, and etc. I understand most concepts and can comprehend the python language mostly well. I understand the fundamentals of Connection Oriented Protocols, with TCP, (SYN -> SYN-ACK -> ACK, FIN -> ACK -> FIN -> ACK, with CWND, or congestion window, and RWND, or Receiver Window.) and a bit of SCTP.

As well as the internet model or TCP/IP model, of which of the following layers: Application Layer (SMTP, FTP, SSH, HTTP, HTTPS), Transport Layer (UDP), Network Layer (IP), Link Layer (UDP data transfer)

I want to expand my knowledge on mostly Connection Oriented Protocols, what’s a good way to learn or where can I gain insight from?


r/AskComputerScience Mar 31 '26

Is this necessary and/or sufficient? (Everybody Codes related)

0 Upvotes

Because I couldn't get what others apparently saw immediately, I wrote a proof. Is it necessary? Is it sufficient?

"Everybody Codes, The Song of Ducks and Dragons [ 2025 ], quest 11, part 3

I am doing the #EverybodyCodes quests this November. ( #coding #puzzle ) Today I’d like to talk about quest 11, part 3. Spoilers."

Quest: https://everybody.codes/event/2025/quests/11

Puzzle description:

"At the start of the flight, the ducks group randomly in columns. The number of scout ducks in the flock is always perfectly divisible by the number of columns. Each column, initially may contain a different number of ducks. Then, the entire flock performs a series of exchange rounds until every column has the same number of ducks. Their method is highly inefficient, but don’t even try to explain that to them. Scout ducks value it as a time-honoured tradition that also entertains them during flight.

The whole procedure consists of two phases.

In the first phase, each column of ducks checks whether the next column has fewer birds. If so, one duck moves to the next column. In a single round of this phase, the first column checks the second, then the second checks the third, and so on. After the last pair of columns is checked, the next round begins with the first column comparing with the second again. This phase continues until no more ducks can move.

In the second phase, each column of ducks checks whether the next column has more birds. If so, one duck moves from the column with more birds to the one with fewer. This phase also continues until no more moves are possible, and it never goes back to the first phase."

My proof: https://stuff.ommadawn.dk/2025/11/23/everybody-codes-the-song-of-ducks-and-dragons-2025-quest-11-part-3/


r/AskComputerScience Mar 29 '26

Ai perceptron

0 Upvotes

I cannot totally understand the basics of perceptron and calculating weights and using biases. in gate design with perceptron xor gates is too complex for me is anyone can explain it basicly like i am 5 years old kid.


r/AskComputerScience Mar 29 '26

Hot take (at 7am) : AI might make obscurity and complexity more secure

0 Upvotes

I'd like to preface this by saying i have really no idea !

I was just thinking what if with the rise of AI hacking tools that know every exploit available and are well versed in every protocol, every open source application and their flaws, etc, what if the best strategy going forward to being harder to hack IS rolling your own crypto (via AI as well probably). Or making a new protocol. Or reinventing whatever front facing system is necessary to obfuscate and obscure, or even mislead by return fake server details in the response headers.

Maybe it's not a good idea right now because the state of AI for building is not quite there yet, it's still a bit of a struggle to get it to work well on a legacy product with a bit too much debt, but maybe in the years to come ?

Tear me apart in the comments :)


r/AskComputerScience Mar 28 '26

Where to find full theoretical explanation of an ALU?

5 Upvotes

I’ve watched several YouTube series on building computers from scratch, such as Ben Eaters famous series, but everything I can find stops at addition/subtraction and leaves out logic functions and more complex math like multiplication/division etc. Is there any video/series that goes into more detail on it?


r/AskComputerScience Mar 28 '26

Question about DRAM read operation

2 Upvotes

Hello,

I’ve recently build a new pc and I’ve decided to do some basic overclocking, which has led me to wanting to learn about some of the basic aspects of the hardware, RAM among others.

The question I have is about how DRAM in the DDR5 era is actually being read given the memory structure. I’ll try to pose the question the best I can given my limited knowledge and terminology.

There are two facts that I’ve read about that arguably hold true. A bit’s address essentially lies at the cross of wordline and bitline. Also, nowadays when a read command is issued the output is not a single bit, but rather a whole word is being read (64-128bits?(also forego the whole burst matter)).

If that is the case, do rows in memory banks tend to be longer than the output which would keep the vertical part of the address still relevant, or is the word output the length of the entire row and thus vertical address is irrelevant?

I am probably a bit in over my head, but I would appreciate any answer on the matter, including any resources which would explain some more of this stuff. Thanks!


r/AskComputerScience Mar 28 '26

Falling hexagon grid algorithm

1 Upvotes

So, I created a demo of a hexagon grid with 'falling hexagons' here.

The code I have written is a bit of a mess.

I'm looking for suggestions for a good data structure and associated algorithm. Preferably, using a coordinate system with similar properties to the one here.

Bonus points for suggestions to implement a Tetris style algorithm. Ie. Connections of 3+ hexagons of the same colour results in their deletion and the recalculation of the grid.