Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [problem-solving]

Problem solving encompasses a number of techniques known as algorithms, heuristics, root cause analysis, etc.

0
votes
1answer
25 views

How to resolve multiple user serve on multiple location appointment booking system

I'm trying to build an appointment system but at one point I stuck Problem: I define available slots for the next 7 days with help of a cron. I have multiple users serve service more than one ...
0
votes
0answers
67 views

Assigning Tags to obtained Coordinates with respect to Ideal Coordinates

I need an idea to solve the following problem statement. Here we will have two sets of coordinates. Set 1 will have the ideal coordinates with Tags assigned to it which will be as below. Set 2 will ...
-2
votes
1answer
157 views

a valid ranking algorithm for facebook posts

I'm creating a website which will collect posts from facebook's pages to show to the users posts they are interested in (as my graduating project). I'd like to be able to rank the posts that contain ...
1
vote
2answers
115 views

Determining resource exhaustion beforehand

I guess this is a problem solving question but I am out of ideas, don't really know where else I can resort for help, and I need to solve this problem. Essentially we have a set of consumers and a ...
2
votes
1answer
373 views

How to reverse engineer URL routes from a bulk of HTTP requests/responses

I am building a web application crawler that crawls for HTTP requests (GET, PUT, POST, ...). It is designed for one specific purpose; bug bounty hunting. It enables pentesters to insert exploit ...
1
vote
2answers
250 views

Trying to teach a high school student Dynamic Memory Allocation - what are the best ways to do so?

Copied from stack overflow due to feedback So I want to teach someone how to do dynamic memory allocation using the block padding model. What that means is every memory block is prefixed and ...
2
votes
1answer
195 views

Practices for navigating uncertainty in software design

Background: So I'm trying to create my first game engine for learning purposes. After looking up a few articles I was able to design the beginning portions of my engine to at least get me going. My ...
1
vote
2answers
2k views

Understanding of the Carry Flag Bit

Intel 8085: In my textbook it is said: "Carry Flag - this flag is the carry out from the MSB of the A-register. CY is set after an ADD instruction if carry out was generated from the A-register." I ...
3
votes
1answer
1k views

Difficulties with Two's complement in Assembly

Everything discussed here will refer to Intel 8085 (8-bit architecture). When using two's complement number "conversion" : 1.) If we take SBI 0F (subtraction) for example; immediate value 0F(hex) or ...
2
votes
1answer
300 views

What is this Algorithm called? [Traveling Salesman Problem]

I've been thinking about the Traveling Salesman Problem. In examining it and grids of cities, I noticed that I could frequently pick out the shortest route just by staring at it. Granted, I couldn't ...
1
vote
2answers
427 views

Having trouble with AP computer science sample test problem

I am currently taking AP Computer Science at my high school and while looking at some sample AP test problems I came across one that really confused me. Sample Problem The answer to the problem is ...
0
votes
2answers
211 views

Recognize bug or inability to solve a problem by yourself

How to recognize when there is a bug in program or you have an inability to solve concrete problem? I noticed when I concentrate too much time on a problem and can't find a solution, I am starting to ...
14
votes
4answers
1k views

What programming problems do Monads solve? [closed]

I've read a lot of posts that explain what monads are, how unit and bind work, some of them plunging straight into category theory so abstract (for me at least) that makes the eyes bleed, some ...
1
vote
2answers
250 views

How do I have a group of numbers which total does not exceed a limit, and each number must be >= 0?

Suppose I have an array of n numbers. The rules for the array is as below: All the numbers must add up to 1000 If a number changes (positive or negative), all the other numbers in the array must be ...
20
votes
5answers
2k views

Algorithm for calculating a bullet path to a target with max. 2 ricochets

Sorry for the poor title but I didn't have a better way to phrase it... So there's this amazing game by Nintendo (yes!) on Wii called WiiPlay. There're 9 minigames in it, and my favorite one is ...
-2
votes
1answer
370 views

Pairing 40 people over 20 days such that no pair is the same twice or more [duplicate]

I'm trying to figure out what algorithm / method I can use to figure out how to pair people together such that the pairs aren't repeated i.e. if a unique individual is denoted by Px where x is their "...
1
vote
1answer
466 views

Increment or double problem

I have a problem with an assignment. In this assignment I have to create a program which needs to calculate how many different possibilities are there to get from number a to b. To get from a to b you ...
0
votes
0answers
502 views

scrabble solving with maximum score

I was asked a question You are given a list of characters, a score associated with each character and a dictionary of valid words ( say normal English dictionary ). you have to form a word out ...
0
votes
1answer
1k views

Turn over cards in minimum number of steps

Imagine you're given an array of cards. Some of them are facing down (0), while some of them are facing up (1). Is it possible for given fixed K to turn all the cards face-up by turning over any K ...
2
votes
1answer
644 views

Genetic Algorithm's Tournament Selection limit to be selected

I started working again on a Genetic Algorithm and i'm trying a lot of operators and ways of selection. When I made the Tournament Selection , I noticed that it gets really easy to always get the top ...
-1
votes
2answers
206 views

How do developers deal with “where to start” problem in a context of overwhelming difficulties caused by too much heterogeneous information? [closed]

A friend of mine, a beginner PHP programmer, needs to link the product his company develops with a third-party product (a set of web services). He received the "relevant" documentation (a few hundred ...
2
votes
1answer
629 views

Solving a probabilistic problem

So I am interested in Computational Investing and came across this problem on a wiki page: Write a program to discover the answer to this puzzle:"Let's say men and women are paid equally (from ...
3
votes
2answers
245 views

Ranking players depending on decision making during a game

How would I go about a ranking system for players that play a game? Basically, looking at video games, players throughout the game make critical decisions that ultimately impact the end game result. ...
2
votes
0answers
75 views

Setting permissions issue for admins and lower users in project

I am working in a jsp project an got stuck in a big problem. My project consist of accounts table for super admin, reseller, admin and users for executives and manager mapped in the account ...
2
votes
2answers
186 views

What do you call a problem caused by a design flaw [closed]

Is there any terminology for a problem that is caused by a previous wrong decision? For example you build your own framework, with a flawed MVC design. This in turn leads to weird situations when ...
3
votes
3answers
1k views

Genetic Algorithm new generation exponentially increasing

I'm programming Genetic Algorithm in C++ and after searching all kind of ways of doing GA'a operators (selection, crossover, mutation) I came up with a doubt. Let's say I have an initial population ...
0
votes
1answer
107 views

Automatically analyze excel files

I have to replicate a manual generation of a large number of excel files. I started to manually track the relations between cells ( files, formulas, etc). I also had a talk with the person which ...
5
votes
1answer
450 views

Does anybody recognize this scheduling problem? Is there an algorithm for it?

Consider the following problem: Description: There are n jobs J1...Jn with cycle times C1....Cn. Find a time quantum and a scheduling table considering that: any element of the table contains at ...
0
votes
1answer
168 views

Estimed number of tries

Problem: The Oscar Committee wants to decide which person should get the best actor award among the given N actors.For that they decided to use a random function random_bit() which returns either 0 ...
0
votes
7answers
441 views

How to avoid errors and not miss anything [duplicate]

I have a problem that is more serious than it might seem. I've been programming for about three years , and I have learned and improved a lot , I read the code easily to others, understand the ...
-2
votes
1answer
181 views

Permutations of an array [closed]

I have an array of integers of length 20, filled with fourteen 0s, two 1s, two 2s and two 3s. It is like this: [0,0,0,3,0,2,0,0,3,0,0,0,1,0,2,0,0,1,0,0]. I need a way to list all of its 20!/(14! 2! 2!...
3
votes
4answers
898 views

Optimistic & Pessimistic Programming - Ensuring multiple tasks are called only once for specific record

Let's say you have 10 database records which you need to process in the following way: Start Pull 2 records from the database with the 'Processed' flag set to 'false' Call the external web service ...
1
vote
3answers
616 views

Are problem-solving programming questions useful for improving one's general programming ability?

For example, like: The inaugural International Olympiad in Frogleaping is being held in Australia in 2013 and you are determined to win. While you want nothing to do with such slimy, jumpy creatures, ...
1
vote
1answer
359 views

Questions about the issue of getting stuck in a problem, and making snail's pace progress [closed]

Let me describe my background. I am currently a software developer co-op working at an architecture firm that has a large focus on research and development, mainly in mathematical modeling and ...
2
votes
1answer
390 views

Programming puzzle with constant selection

THE QUESTION: There is an event where there are N contestants. There are three tasks in the event: A,B,C (say). Each participant takes part in the events in the listed order: i.e a contestant must ...
1
vote
0answers
307 views

Karger's algorithm for bin-packing?

I first came across that algorithm as the "Random minimum cut" algorithm. And recently a colleague was trying to pack a big quantity of small textures into one image file. Then it clicked - why not ...
5
votes
3answers
1k views

How to detect root cause of problem or bug [closed]

Often in coding, I find it very slow and difficult to detect the root cause of a bug and sometimes I end up going to wrong point in my code. It's painful. I know that to detect the root cause of a bug ...
10
votes
6answers
2k views

How to save during real-time collaboration

I want multiple users to edit same document. Problem I'm facing is when a new user joins, he might see an outdated document. How do I make sure that new users get most recent changes? Some solutions ...
-3
votes
1answer
1k views

Any tips in tackling extremely complex problems like the Hanoi Tower problem? [closed]

People often give me the "divide and conquer" tip, but I think for some problems it's not nearly enough. The problem with such a complex problem as the Hanoi Tower problem is that you can't even ...
1
vote
1answer
331 views

Idea of the binary search main theorem

This link really provided some insights into the idea that binary search implications into the optimization problems by giving the main theorem. I am not really confident that I get the idea of the ...
14
votes
8answers
4k views

In an interview, is it better to code a brute-force solution to a tough question, or to spend the interview examining the question carefully? [closed]

Sometimes interview questions are hard, whether the interviewer intends them to be, or not. It can come down to a choice of whether to use the limited interview time to code up an ugly, inefficient, ...
0
votes
2answers
322 views

Help to simplify/model complex decision making (if, then, else scenarios)

I find my self in a situation, where I need to program a service, that can determine if two object in a huge database are the same. For simplicity, let's say it's used cars, and I want to determine if ...
6
votes
3answers
335 views

Should I fix small issues or let them go? [closed]

I ran into the following issue where a keyboard shortcut I was used to was no longer working in Ubuntu. That's just an example. For programming, this kinds of thing happens a lot, but it also happens ...
18
votes
3answers
2k views

How to avoid jumping to a solution when under pressure? [closed]

When under a particularly strict programming deadline (like an hour), if I panic at all, my tendency is to jump into coding without a real plan and hope I figure it out as I go along. Given enough ...
8
votes
4answers
2k views

algorithm for project euler problem no 18

Problem number 18 from Project Euler's site is as follows: By starting at the top of the triangle below and moving to adjacent numbers on the row below, the maximum total from top to bottom is 23. 3 ...
2
votes
3answers
4k views

Calculating 3d rotation around random axis

This is actually a solved problem, but I want to understand why my original method didn't work (hoping someone with more knowledge can explain). (Keep in mind, I've not very experienced in 3d ...
5
votes
3answers
2k views

Steps to create a solution for a problem

I am a trainee. According to my teacher to solve a problem we should go through following steps: Create Algorithm (optional) Create a Datatable: By analyzing the problem, create main concepts in ...
18
votes
6answers
1k views

When to prefer a generalized solution over solving specific cases

In programming we're often faced with a choice: cover each conceivable use case individually, or solve the general problem: Its obvious that solving the immediate problem is faster, however creating ...
3
votes
2answers
197 views

How to find an error in a tcp server application for which there is no source code

I have a c++/cli tcp client application sending a data in a specific format like L,20100930033425093,-5.929958,13.164021 to a main application on port 9000.The main application is actually done by the ...
7
votes
6answers
2k views

How do the algorithms to solve problems encountered in interviews translate into real world solutions? [closed]

I have recently finished an undergraduate course in computer science and I am looking for a job. During the search I encountered several interesting (and tough) problems that needed clever algorithms ...