Questions tagged [computer-science]

Computer science (CS) is the science behind programming. Use for questions related to the more theoretical questions involving programming. Questions of a purely theoretical nature may be off-topic. All CS questions can be asked on https://cs.stackexchange.com/

Computer science (also called computing science, and often abbreviated CS) is the study of the theoretical foundations of information and computation and of practical techniques for their implementation and application in computer systems. Computer scientists invent algorithmic processes that create, describe, and transform information and formulate suitable abstractions to model complex systems.

As a discipline, computer science spans a range of topics from theoretical studies of algorithms and the limits of computation to the practical issues of implementing computing systems in hardware and software.

While some computer science questions are on-topic for Stack Overflow, many of the more theoretical questions or questions that do not apply to programming are off-topic. You can ask these types of questions on the Computer Science Stack Exchange.

4449 questions
1
vote
4 answers

Another way to compare two values of an array List to find the lonely integer in Java?

The problem to solve is to find a non-repeating integer in an Integer list. I used a while loop to compare each value with another. The function, however, returns the wrong value. This is a Hackerrank challenge which can be found here . public…
coding girl
  • 183
  • 3
  • 15
1
vote
0 answers

How to map image pixel information of a scene onto the point cloud of the same scene?

I have a point cloud from a Leica range scanner and a set of images from the same indoor scene taken by a camera. is there any way I can map the pixel information from images onto the 3D scanned data? Is it possible to perform the measurements in a…
Nima
  • 45
  • 1
  • 6
1
vote
1 answer

An entity relationship diagram shows the relationship between entities, but how do you show the relationship between attributes?

Say I had three types of vehicle, which are all related by some similar attributes. What is the best way to show these relationships?
1
vote
1 answer

Is it possible to implement PRAM CRCW algorithms on consumer processors with the same big O scalability?

I've come to learn that there are linear time sorting algorithms that don't run by comparisons like radix sort. My hope is to have a sorting algorithm that runs in linear time but can also run in constant time by running n threads for n elements.…
1
vote
0 answers

Bold text detection

I am currently working on a project where I need to detect bold text on a multi font-size image (so no mathematic morphology possible). This detection will be used in parallel of an OCR system (with tesseract) to detect which information (in bold)…
Ketchup
  • 150
  • 11
1
vote
2 answers

Facing "Could not find all of moc, rcc, and uic for Qt5" in omnet++ version 5.7. while installing

I followed every steps of installation manual while installing it. according to the manual, I need to type ./configure. Whenever I typed it, the problem occurred. Showing the exact line"Could not find all of moc, rcc, and uic for Qt5 -- nope, nope,…
1
vote
0 answers

Having some trouble with solving for runtime

In Big-Θ notation, analyze the running time of the following three pieces of code/pseudo-code, describing it as a function of the input, n. 1. void f1(int n) { int t = sqrt(n); for(int i = 0; i < n; i++){ for(int j = 0; j < n; j++){ //…
1
vote
0 answers

How To Create a LSTM Model With Multiple Generator Inputs

I'm Trying to predict price of a product using two inputs at the same time : The first inputs are the last 24 hours of sales ; The seconde inputs are the last 72 hours of sales; I want to get the prediction of price using the first inputs and the…
1
vote
2 answers

How to simulate velocity in a falling sand game?

I'm creating a falling sand game and would like to implement velocity so elements can travel in different directions at varying speeds. Games such as Noita use this and it smoothens out the movement of the elements. I have a 2d array and shift the…
Michael
  • 3,411
  • 4
  • 25
  • 56
1
vote
0 answers

Remove the lowercase vowels [C]

I'm learning C and I got a task to to remove the lowercase vowels (a, e, i, o, u) in a given string. so I wrote this code and I'm getting Segmentation fault error in line 15, can someone explain me why I'm getting this error, how to avoid getting…
Patton13
  • 27
  • 5
1
vote
3 answers

Trying to understand Amdahl's Law

I am trying to answer a school assignment but i am getting confused to what the question is trying to ask. A design optimization was applied to a computer system in order to increase the performance of a given execution mode by a factor of 10. The…
1
vote
1 answer

Is there such a thing as "non-binary" data?

When you get down to the bare metal, all data is stored in bits, which are binary (1 or 0). However, I sometimes see terms like "binary file" which implies the existence of files that aren't binary. Also, for things like base64 encoding, which…
1
vote
2 answers

Is there an efficient data structure for row and column swapping?

I have a matrix of numbers and I'd like to be able to: Swap rows Swap columns If I were to use an array of pointers to rows, then I can easily switch between rows in O(1) but swapping a column is O(N) where N is the amount of rows. I have a…
ubershmekel
  • 11,864
  • 10
  • 72
  • 89
1
vote
1 answer

How to express recursive calls in higher dimensions

Just a question of curiosity, not serious. In the JS language I know that a factorial operation can be defined in the following form. function factorial(n) { if (n === 1) return 1; return factorial(n - 1) * n; } Then I defined a factorial…
Lane Sun
  • 13
  • 4
1
vote
1 answer

Mathematical proof of maximum possible number of palindromic substrings possible in a string?

I need to prove that in a string with a number of characters n, at most n distinct, non-empty palindromic substrings are possible. I can understand that this is because every character can be a palindrome in and of itself, and so the max possible…
user202004
  • 151
  • 8