Top "Computer-science" questions

Computer science (CS) is the science behind programming.

Balancing a Binary Tree (AVL)

Ok, this is another one in the theory realm for the CS guys around. In the 90's I did fairly …

algorithm computer-science binary-tree theory avl-tree
Function pointers, Closures, and Lambda

I am just now learning about function pointers and, as I was reading the K&R chapter on the …

c lisp lambda computer-science closures
How does semaphore work?

Can the semaphore be lower than 0? I mean, say I have a semaphore with N=3 and I call "down" 4 times, …

java multithreading computer-science semaphore
Representing identifiers using Regular Expression

The regular definition for recognizing identifiers in C programming language is given by letter -> a|b|...z|A|…

regex computer-science regular-language
Is Quicksort in-place or not?

So the space efficiency of Quicksort is O(log(n)). This is the space required to maintain the call stack. …

algorithm computer-science quicksort in-place space-efficiency
Euclidean distance vs Pearson correlation vs cosine similarity?

Their goals are all the same: to find similar vectors. Which do you use in which situation? (any practical examples?)

algorithm computer-science vector
OpenCV: Find all non-zero coordinates of a binary Mat image

I'm atttempting to find the non-zero (x,y) coordinates of a binary image. I've found a few references to the …

c++ opencv image-processing computer-vision computer-science
Difference between JUMP and CALL

How is a JUMP and CALL instruction different? How does it relate to the higher level concepts such as a …

functional-programming recursion computer-science
Eventual consistency in plain English

I often hear about eventual consistency in different speeches about NoSQL, data grids etc. It seems that definition of eventual …

nosql computer-science data-storage eventual-consistency
Solving a recurrence: T(n)=3T(n/2)+n

I need to Find the solution of the recurrence for n, a power of two if T(n)=3T(n/2)+…

algorithm time-complexity computer-science recurrence