Skip to main content

Questions tagged [problem-solving]

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

Filter by
Sorted by
Tagged with
40 votes
28 answers
4k views

Which world most important algorithms have contributed most to humankind in past decades? I thought this is a good general knowledge for a developer to know about. Update: If possible, please keep ...
62 votes
15 answers
13k views

You ever try to implement something simple but for some strange reason it doesn't work. So you try a possible solution but then something else doesn't work. You keep trying different workarounds but ...
50 votes
26 answers
97k views

Everyone says the same thing: "a real programmer knows how to handle real problems." But they forget how they learned this ability or where: it's not taught in schools. What can I do to improve my ...
59 votes
12 answers
12k views

What language, in your opinion, allows the average programmer to output features with the least amount of hard-to-find bugs? This is of course, a very broad question, and I'm interested in very broad ...
0 votes
2 answers
221 views

I'm not sure if this is the right stack exchange site for this, or maybe this is more of a reddit question, but don't rake me over the coals for asking. Happy to go post on another corner of the ...
hyphen's user avatar
  • 109
40 votes
10 answers
2k views

Perfectionism may be good and bad when programming. When and where do you draw the line when you are problem solving? When do you decide when a solution is overkill, too general or simply too ...
Amir Rezaei's user avatar
  • 11.1k
7 votes
1 answer
3k views

I'm looking for an algorithm for placing tiles of different sizes within a complex area (all 2D) as randomly but efficiently as possible. I know the different dimensions of the tiles provided and the ...
Component 10's user avatar
35 votes
9 answers
2k views

As a programmer, I find myself in the dilemma where I want make my program as abstract and as general as possible. Doing so usually would allow me to reuse my code and have a more general solution ...
Nayrb's user avatar
  • 2,514
30 votes
13 answers
10k views

This is a somewhat subjective quesiton but I'd love to hear feedback/opinions from either interviewers/interviewees on the topic. We split our technical interview into 4 parts. Write Code, Read & ...
Eoin Campbell's user avatar
42 votes
12 answers
5k views

In another question I asked recently about best practices for whiteboarding, there was general consensus that thinking out loud while coming up with the answer was the best strategy. Indeed, long ...
Bjorn's user avatar
  • 727
3 votes
3 answers
2k views

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 ...
Chris G's user avatar
  • 51
3 votes
2 answers
280 views

Recently I was asked in a interview to implement to e-commerce site . One of the requirement was to maintain cart details across various devices .(i.e) if user adds a book from his iPhone , and when ...
user3878073's user avatar
-1 votes
2 answers
154 views

I need to think of a way to model how one thing is more "changy" than another. Say I need to index a news website's different news sections with some web crawler. I want to prioritise ...
user avatar
25 votes
9 answers
25k views

This is happening in every team. For some reasons, conflicts arise in the team and they affect the overall motivation and productivity. What is your recommended approach to solve that common problem?...
user avatar
7 votes
1 answer
700 views

I'm trying to determine what is the fewest number of bits I need to represent the state of a Rubik's cube. (EDIT: I am assuming the cube is a valid Rubik's cube that has not been altered and only ...
J Price's user avatar
  • 89
0 votes
4 answers
734 views

Lately I've encountered a similar problem in a few different circumstances, and every time it has required quite a bit of extra code to work around it. The problem I'm talking about is the one where ...
Magnus's user avatar
  • 415
21 votes
5 answers
4k views

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 ...
hello all's user avatar
  • 358
22 votes
6 answers
2k views

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 a ...
AncientSwordRage's user avatar
12 votes
10 answers
843 views

Yesterday I spent a good part of the afternoon trying to fix a bug, which I thought to be trivial. I was going around in circles, not having a clue what was wrong. Rewriting large parts of the code. ...
Jeremy French's user avatar
14 votes
8 answers
9k views

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, ...
GlenPeterson's user avatar
6 votes
3 answers
2k views

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 ...
taqmaninw's user avatar
10 votes
6 answers
4k views

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 ...
dev.e.loper's user avatar
13 votes
10 answers
973 views

I really enjoy programming games and puzzle creators/games. I find myself engineering a lot of these problems the same way and ultimately using similar technique to program them that I'm really ...
Nayrb's user avatar
  • 2,514
15 votes
4 answers
2k views

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 ...
Dummy Me's user avatar
  • 195
12 votes
10 answers
3k views

In every problem solving there's always people who think differently, who come with a 6th option when only 5 were suggested by others, who think "out of the box". Please tell how one can achieve such ...
Denys S.'s user avatar
  • 621
1 vote
0 answers
224 views

I have multiple rectangular frames, with different fixed heights. The width should be minimized and there is a maximum width. Then there are many different smaller rectangles. These should be packed ...
Wombosvideo's user avatar
9 votes
6 answers
1k views

I solve many problems, mostly from Top Coder. I will get answers for many, but most times I end up with an inefficient solution. In real-world implementations - does it really matter that a solution ...
Ant's's user avatar
  • 732
14 votes
7 answers
10k views

I'm continually becoming overwhelmed by large projects, once they reach a certain level of complexity. Once I reach a certain point in a project, my progress slows to a crawl and I find myself ...
pup's user avatar
  • 1,722
18 votes
3 answers
3k views

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 ...
GlenPeterson's user avatar
1 vote
1 answer
228 views

I’m working on a problem which I will try my best to describe: You have a stack of 5 blocks: labelled A, B, C, D and E. You also have a set of rules giving points if certain conditions are met, for ...
Sam Kennedy's user avatar
2 votes
2 answers
5k views

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 ...
Lucenzo97's user avatar
  • 293
11 votes
5 answers
20k views

Do you think it's a good practice to implement a possibilty to allow an administrator user to login in as another user, by-passing password? This could by implemented by a master password or a ...
user avatar
0 votes
1 answer
148 views

I am working on a microservice, in an event driven world, where I have tens of 1000s of rules configured which depend on data type A, B, C, D and so on. As soon as an event arrives I want to be able ...
Harshdeep's user avatar
3 votes
1 answer
4k views

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 ...
Lucenzo97's user avatar
  • 293
3 votes
4 answers
2k views

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 ...
HABJAN's user avatar
  • 171
7 votes
7 answers
8k views

Are there any resources for paying more attention to detail as a software developer? (Especially edge cases, or small mistakes in code, details in the problem description, ramifications for certain ...
Cervo's user avatar
  • 1,748
2 votes
1 answer
1k views

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 ...
Tijme's user avatar
  • 31
5 votes
5 answers
10k views

I'm a beginner learning Java and after reading the docs I'm trying to solve some of the problems at codingbat.com. Some I managed to solve pretty quickly in a matter of seconds but some not quite. The ...
user avatar
7 votes
6 answers
3k views

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 ...
josh88's user avatar
  • 97
3 votes
1 answer
299 views

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 ...
Jason's user avatar
  • 469
0 votes
1 answer
209 views

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 ...
Devratna's user avatar
  • 103
-2 votes
1 answer
226 views

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 ...
Mohammed Nosirat's user avatar
7 votes
4 answers
3k views

I am doing some personal research on Byzantine Faults. I am trying out algorithms from various research papers which present algorithms for consensus in distributed systems like this one. For this i ...
Chani's user avatar
  • 1,465
0 votes
7 answers
689 views

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 ...
Aitor Gonzalez's user avatar
1 vote
2 answers
195 views

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 ...
dabadaba's user avatar
  • 2,266
5 votes
3 answers
4k views

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 those ...
Mr_Green's user avatar
  • 181
1 vote
2 answers
458 views

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 ...
Extrakun's user avatar
  • 999
8 votes
4 answers
2k views

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 ...
Valentino Ru's user avatar
2 votes
2 answers
339 views

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 ...
user64742's user avatar
  • 145
1 vote
3 answers
673 views

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, ...
Zerium's user avatar
  • 433