problem-solving

How to find average loading time for website ?

How to write a code (in any programming language, preferably in java), which calculates the average loading time of any website (including all embedded elements such as images, Javascript, CSS, etc.) ? ...

Using graph theory to generate an exam schedule

Hey SO, I came across this website while looking for help on the internet regarding adj. matrix / graph theory. My program layout is as follows: student name + courses stored in a 2D array array with all distinct courses I am trying to achieve the following: use adjacency matrix to create an exam schedule where no student needs ...

A problem During running OracleDBConsoleoracle service

I am facing this problem when I try to run OracleDBConsoleoracle in oracle 11 "Windows could not start the OracleDBConsoleoracle on Local Computer.For more information, review the System Event Log.If this is a non-Microsoft service, contact the service vendor, and refer to service-specific error code 2." Noteice:I was online when I i...

What is the name of this problem?

You are given a list of distances between various points on a single line. For example: 100 between a and b 20 between c and b 90 between c and d 170 between a and d Return the sorted sequence of points as they appear on the line with distances between them: For example the above input yields: a<----80-----> c <----20------> b <-...

Problem solving in sleep

Often i get solution to a problem I am stuck or even new idea while sleeping... Has anyone else experienced that too or there is something terribly wrong with me. :) ...

1x10^49 in decimal - how binary bits is that and how would you convert it to binary?

I've encountered a website that uses a 50-digit decimal integer ID in a URL query string, which seems a little excessive. The smallest 50-digit decimal number is 1.0 x 10^49, otherwise known as: 1000000000 0000000000 0000000000 0000000000 0000000000 How many bits would the binary representation contain? How would you approach conver...

What approach do you use to find information on how a class/method/framework works?

I ran into a question today, where the author referenced the documentation for a particular framework but had questions about how a class actually worked. The documentation was not as clear as it could be -- turned out the information was there once you figured out that you needed to look at the parent class for a description of one of ...

Monty Hall Problem

Through trying to explain the Monty Hall problem to a friend during class yesterday, we ended up coding it in Python to prove that if you always swap, you will win 2/3 times. We came up with this: import random as r #iterations = int(raw_input("How many iterations? >> ")) iterations = 100000 doors = ["goat", "goat", "car"] wins = 0.0 ...

Is Programming always interesting?

Now that I am about to start a career as a programmer, I wonder if programming is always as interesting as it is initially to a programmer. After years of programming, does this job still remain interesting? ...

T-Sql Query - Get Unique Rows Across 2 Columns

I have a set of data, with columns x and y. This set contains rows where, for any 2 given values, A and B, there is a row with A and B in columns x and y respectivly and there will be a second row with B and A in columns x and y respectivly. E.g **Column X** **Column Y** Row 1 A B Row 2 ...

Generic sub-set algorithm problem

I have the following problem. I've got a set of items {a1, a2, a3, ... aN}. Each one of those items can contain another set of items {b1, b2, b3, ... bN}. So the end result looks something like this: a1 b4 b22 b40 b11 b9 a2 b30 b23 b9 b4 b11 a3 b22 b4 b60 b9 As a result of the execution of the algorithm I ...

What do you do when you encounter a tricky problem?

What do you do when you encounter a programming problem that is really hard for you to solve, and you have no idea yet? Usually, how do you solve it at last? Thanks in advance! NOTES: Could someone introduce something about problem solving practice? ...

Do you ever get coder's block, and what are the usual causes, and solutions?

Probably duplicate of Dealing with “Coder’s Block” (or blank form syndrome) Coder's block similar to writer's block that is. Common things I can think that are giving me coder's block right now are (I think) focusing on the big picture so much that I don't know where to start, or knowing exactly what I want to do with a certain techn...

PHP Problem Solving

What's the best way to create a PHP form that takes a users input in the form of five decimal numbers: displays the five decimal numbers display the sum of the five decimal numbers display the average the five decimal numbers display each number rounded to the nearest integer? ...

Problem solving in C++ with STL

I am preparing for a programming competition in witch we solve programming problems in c++. Looking at the former year solutions, they seem quite easy (not more than ~30 lines of code). I realised that they are widely using the STL for easy manipulating - vectors, sets, maps, lists and also the algorithms available in STL. Any site fo...

Where to get good algorithm problem with solutions

Hi all, I know some algorithm judge online system, but few of them have the solution attached. Most of the time after I deliever my own answer on those system, I can seen other people's solution have fewer memory usage and shorter CPU time cost which after refactories my code can not achieve. Is there any problem set have elegant soluti...

Can I ask for some guidance in solving this algorithm related problem?

Hello, In my free time I like polishing my algorithm / programming skills (well, my skills suck and I try to improve them) by solving problems on pages like topcoder.com or uva.onlinejudge.com. Usually I can write and code correct algorithm for simpler problems - I understand most of the basic concepts regarding things like recursion or...

What's your Modus Operandi for solving a (programming) problem?

While solving any programming problem, what is your modus operandi? How do you fix a problem? Do you write everything you can about the observable behaviors of the bug or problem? Take me through the mental checklist of actions you take. ...

Debugging: High-level versus low-level bugs

What is the approximate ratio of time you typically spend debugging high-level versus low-level bugs? For the purposes of this discussion, high-level bugs are things like incorrect algorithms, bad assumptions about input data and/or operating environment, cases that were overlooked in the initial implementation of something, forgetting ...

Algorithm for solving Sudoku

I want to write a code in python to solve a sudoku puzzle. Do you guys have any idea about a good algorithm for this purpose. I read somewhere in net about a algorithm which solves it by filling the whole box with all possible numbers, then inserts known values into the corresponding boxes.From the row and coloumn of known values the kno...