Problem Detail: In my world there are nodes and lines, I want to see if there is any path between node A, and node B, that do not cross any line(including the lines of the path itself) and do not go Read More …
Blog
[Solved]: Compare-and-Swap in an RDBMS for custom locks and lock escalation
Problem Detail: I’m applying the Compare-and-Swap technique to a SQL database to create custom row-level locking in my dataset, allowing for safe READ UNCOMMITTED isolation at the database level. The Resource table includes a LockOwner GUID and a IsLocked BIT field. Read More …
[Solved]: Why doesn’t the binary fraction representation match the decimal fraction representation?
Problem Detail: The Problem: What value does the hexadecimal number x55544552 represent in data type IEEE floating point? My Work: I first wrote out that hexadecimal number in binary and got 0101 0101 0101 0100 0100 0101 0101 0010 Read More …
[Solved]: Need to remove indirect left recursion from CFG
Problem Detail: I need to remove indirect left recursion from the following CFG: remove indirect left recursion from the following CFG. $$A → Ba| b$$ $$B → Cd | e$$ $$C → Df | g$$ $$D → Df | Aa | Read More …
[Solved]: Is it possible to convert a graph with one negative capacity to a graph with only positive capacities?
Problem Detail: I am interested in whether a graph (say, a complete graph) with one capacity negative (or many, but one should suffice) can be reconstructed as a graph with all non-negative capacities where the max flow between vertices of the Read More …
[Solved]: match an array with a given set of arrays
Problem Detail: We have a set of 24 distinct arrays, each array has 36 elements and each element can have one of 13 possible values. Then we’re given an array X (this array is certainly part of our set) and we Read More …
[Solved]: Using singly linked list instead of a doubly linked list?
Problem Detail: Are there advantages of implementing a singly instead of a doubly linked list other than space? Asked By : PRX Answered By : babou Other than saving space, the first advantage I can see for singly linked lists over doubly linked Read More …
[Solved]: Shouldn’t complexity theory consider the time taken for different operations?
Problem Detail: I have read the answer found here which considers the size of integers when doing comparisons and how that affects on the basic cost of comparison. I am trying to understand why each basic operation takes $O(1)$ time. For Read More …
[Solved]: Which textbook can I use after a high school CS course?
Problem Detail: I just finished the AP Computer Science course in high school and since my school does not have any further classes, I was thinking about getting a textbook and continuing my study. APCS goes through Big O, Arrays + Read More …
[Solved]: Will ternary computers be faster than binary?
Problem Detail: If we had a computer in base 3 which used the characters {0, 1, 2} instead of just {0, 1} (and we implemented a ternary logic on the hardware), will this computer be faster than computer using binary? Why Read More …