Search Results

Search found 1309 results on 53 pages for 'solving'.

Page 3/53 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Finding a problem in some task [closed]

    - by nagisa
    Recently I competed in nation wide programming contest finals. Not unexpectedly all problems were algorithmic. I lost (40 points out of 600. Winner got ~300). I know why I lost very well - I don't know how to find actual problem in those obfuscated tasks which are life-blood of every competition. I think that being self-taught and not well versed in algorithms got me too. As side effect of learning things myself I know how to search for information, however all I could find are couple questions about learning algorithms. For now I put Python Algorithms: Mastering Basic Algorithms in the Python Language and Analysis of Algorithms which I found in those questions to my "to read" list. That leaves my first problem of not knowing how to find a problem unsolved. Will that ability come with learning algorithms? Or does it need some special attention? Any suggestions are welcomed.

    Read the article

  • Where can you find fun/educational programming challenges?

    - by tj9991
    I've searched around for different challenge sites, and most of them seem to be geared towards difficulty in problem solving logically, rather than trying to use your language of choice to do something you haven't used it for. Their center is around mathematics rather than function design. Some kind of point system for correctly solving challenges, or solving them the most efficient/smallest would be neat as well. Listed sites Project Euler TopCoder UVa Online Judge Challenges with Python Google Code Jam Programming Challenges Less Than Dot ACM's Programing Contest archive USACO problems ITA Software's puzzle page Refactor My Code Ruby Quiz

    Read the article

  • How would you refactor nested IF Statements?

    - by saunderl
    I was cruising around the programming blogosphere when I happened upon this post about GOTO's: http://giuliozambon.blogspot.com/2010/12/programmers-tabu.html Here the writer talks about how "one must come to the conclusion that there are situations where GOTOs make for more readable and more maintainable code" and then goes on to show an example similar to this: if (Check#1) { CodeBlock#1 if (Check#2) { CodeBlock#2 if (Check#3) { CodeBlock#3 if (Check#4) { CodeBlock#4 if (Check#5) { CodeBlock#5 if (Check#6) { CodeBlock#6 if (Check#7) { CodeBlock#7 } else { rest - of - the - program } } } } } } } The writer then proposes that using GOTO's would make this code much easier to read and maintain. I personally can think of at least 3 different ways to flatten it out and make this code more readable without resorting to flow-breaking GOTO's. Here are my two favorites. 1 - Nested Small Functions. Take each if and its code block and turn it into a function. If the boolean check fails, just return. If it passes, then call the next function in the chain. (Boy, that sounds a lot like recursion, could you do it in a single loop with function pointers?) 2 - Sentinal Variable. To me this is the easyest. Just use a blnContinueProcessing variable and check to see if it is still true in your if check. Then if the check fails, set the variable to false. How many different ways can this type of coding problem be refactored to reduce nesting and increase maintainability?

    Read the article

  • Which problem(s) do YOU want to see solved?

    - by buu700
    My team and I are meeting tonight to come up with a business plan and some community input would be amazing. I've been mulling over this issue for the past few months and bouncing ideas off of others, and now I'd finally like some input from the community. I have come up with a fair selection of ideas, but most of those amount to either fun projects which could potentially be profitable, or otherwise solid business models that have one or two major hurdles (usually related to resources or legality). For our team meeting tonight, my idea is to take inventory of our available skills, resources, and compelling problems which interest us. The last is where I would greatly appreciate some community input. Hell, even entire business ideas/plans would be appreciated. No matter how big or small your thoughts, any input would be appreciated. We're a team of computer scientists, so our business will be primarily based around software/technology/Web solutions. Among my relevant available resources (entire Internet aside), I have the following: A pretty reliable connection to an SEO company a large production company. A stash of fairly powerful server hardware. A fast network with static IPs. The backend for Hackswipe, which includes credit card payment processing and a Google Voice-based SMS gateway. This work in progress design for something completely unrelated but which is backed by some fairly decent infrastructure. Direct access to the experts in just about any relevant field (on-campus Carnegie Mellon professors). A sexual relationship with the baron of a small nation. For further down the line, some investor relationships. Not likely to be so relevant, but a decent social media presence (Stack Overflow reputation, modship in some major reddits, various tech forums). The source code for Eugene fucking McCabe. Pooled with the other team members, the list of projects we can build off of would be longer (including an Android app). So, what are your thoughts? Crossposted to reddit

    Read the article

  • Is "White-Board-Coding" inappropriate during interviews?

    - by Eoin Campbell
    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 part into 4 parts. Write Code, Read & Analyse Code, Design Session & Code on the white board. For the last part what we ask interviewees to do is write a small code snippet (4-5 lines) on the whiteboard and explain as they go through it. Let me be clear the purpose is not to catch people out. We're not looking for perfect syntax. Hell it can even be pseudo-code. but the point is to give them a very simple problem and see if their brain can communicate the solution to us. By simple problems I mean "Reverse a string", "FizzBuzz" etc... EDIT Just with regards the comment about Pseudo-Code. We always ask for an explicit language first. We;re a .NET C# house. we've only said "pseudo-code" where someone has been blanking/really struggling with the code. My question is "Is it innappropriate / unreasonable to expect a programmer to write a code snippet on a whiteboard during an interview ?"

    Read the article

  • Automatically analyze excel files

    - by dole doug
    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 generates those files. For now I have a general understanding about how the excel files are generated, but "devil is in the details". I assume that I can write a script which will generate the hierarchy between cells and files, but this might require the same effort as manually noticing the relations. Also, I'm afraid that I'm not too experienced and my app is more prone to error approach than a manual analyze. How to handle this problem? Do you know about an open source project which analyze the excel files in a recursive mode following the formulas ?

    Read the article

  • programming manner to solve problem

    - by gcc
    Everyone has style(s)/technique(s) to approach/solve real world problems. This/these technique(s) distinguish(es) us from other people or other programmers. (Actually, I think it make us a wanted/ great programmer/computer science ) To improve, we read a lot of books (ex : programming style, how to solve program, how to approach problem, software and algorithm). Can I learn your technique? In other words, if someone gives you a problem, at first step, what are you doing to solve it? (In all honesty, I want learn in what manner you are looking problem )

    Read the article

  • My first time in the gambling industry

    - by sfrj
    I am a Java enterprise developer with almost 3 years of professional experience. Soon i am going to have a face to face interview with a company in the gambling industry. I already did successfully a phone screening and now for the personal interview i suppose they will ask me about some kind of white board problem or system design task. I think i am in the right place to ask about this, and would appreciate a lot if someone would give me some tips or share something related to his own experience. The things i am more interested in regarding my interview are: What are the most common challenges for programmers, in this industry? Any idea or suggestion on a white board problem they may ask me? Could you point me to some links where i can find information on the topic or sample problems in this industry?. I personally find this question very interesting not just for me. Also i think, the given answers can help also others in a similar situation. Just what i want to say whit this last comment is: Please avoid, answers like: www.google.com and so on...

    Read the article

  • Should I be worried if I solve a lot of my problems the same way?

    - by Bryan Harrington
    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 comfortable with. To give you brief insight, I like to create graphs where nodes are represented with objects. These object hold data such as coordinates, positions and of course references to other neighboring objects. I'll place them all in a data structure and make decisions on this information in a "game loop". While this is a brief example, its not exact in all situations. It's just one way I feel really comfortable with. Is this bad?

    Read the article

  • Calculating 3d rotation around random axis

    - by mitim
    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 programming, having only played with the very basic for a little bit...nor do I have a lot of mathematical experience in this area). I wanted to animate a point rotating around another point at a random axis, say a 45 degrees along the y axis (think of an electron around a nucleus). I know how to rotate using the transform matrix along the X, Y and Z axis, but not an arbitrary (45 degree) axis. Eventually after some research I found a suggestion: Rotate the point by -45 degrees around the Z so that it is aligned. Then rotate by some increment along the Y axis, then rotate it back +45 degrees for every frame tick. While this certainly worked, I felt that it seemed to be more work then needed (too many method calls, math, etc) and would probably be pretty slow at runtime with many points to deal with. I thought maybe it was possible to combine all the rotation matrixes involve into 1 rotation matrix and use that as a single operation. Something like: [ cos(-45) -sin(-45) 0] [ sin(-45) cos(-45) 0] rotate by -45 along Z [ 0 0 1] multiply by [ cos(2) 0 -sin(2)] [ 0 1 0 ] rotate by 2 degrees (my increment) along Y [ sin(2) 0 cos(2)] then multiply that result by (in that order) [ cos(45) -sin(45) 0] [ sin(45) cos(45) 0] rotate by 45 along Z [ 0 0 1] I get 1 mess of a matrix of numbers (since I was working with unknowns and 2 angles), but I felt like it should work. It did not and I found a solution on wiki using a different matirx, but that is something else. I'm not sure if maybe I made an error in multiplying, but my question is: this is actually a viable way to solve the problem, to take all the separate transformations, combine them via multiplying, then use that or not?

    Read the article

  • algorithm for project euler problem no 18

    - by Valentino Ru
    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 7 4 2 4 6 8 5 9 3 That is, 3 + 7 + 4 + 9 = 23. Find the maximum total from top to bottom of the triangle below: 75 95 64 17 47 82 18 35 87 10 20 04 82 47 65 19 01 23 75 03 34 88 02 77 73 07 63 67 99 65 04 28 06 16 70 92 41 41 26 56 83 40 80 70 33 41 48 72 33 47 32 37 16 94 29 53 71 44 65 25 43 91 52 97 51 14 70 11 33 28 77 73 17 78 39 68 17 57 91 71 52 38 17 14 91 43 58 50 27 29 48 63 66 04 68 89 53 67 30 73 16 69 87 40 31 04 62 98 27 23 09 70 98 73 93 38 53 60 04 23 NOTE: As there are only 16384 routes, it is possible to solve this problem by trying every route. However, Problem 67, is the same challenge with a triangle containing one-hundred rows; it cannot be solved by brute force, and requires a clever method! ;o) The formulation of this problems does not make clear if the "Traversor" is greedy, meaning that he always choosed the child with be higher value the maximum of every single walkthrough is asked The NOTE says, that it is possible to solve this problem by trying every route. This means to me, that is is also possible without! This leads to my actual question: Assumed that not the greedy one is the max, is there any algorithm that finds the max walkthrough value without trying every route and that doesn't act like the greedy algorithm? I implemented an algorithm in Java, putting the values first in a node structure, then applying the greedy algorithm. The result, however, is cosidered as wrong by Project Euler. sum = 0; void findWay(Node node){ sum += node.value; if(node.nodeLeft != null && node.nodeRight != null){ if(node.nodeLeft.value > node.nodeRight.value){ findWay(node.nodeLeft); }else{ findWay(node.nodeRight); } } }

    Read the article

  • Steps to create a solution for a problem

    - by Mr_Green
    I am a trainee. According to my teacher, he says that to solve a problem we should go with steps to solve it like Create Algorithm (optional) Create a Datatable: By analyzing the problem, create main concepts in those problem as columns and the related issues in the main concept as rows. Create a Flowchart based on the Datatable. (when creating flow chart, think that you are in that situation and design it in your brain) By seeing the Flowchart, solve the problem. These steps should always consider by a programmer if he/she wants to become a Software designer (not programmer). Because the above approach gives an efficient way of finding solution to a problem even the problem is small. According to him, this way of approach also works in real time scenario's. My question is: Is this really an efficient way? please share also your thoughts. Keeping beside my question I just want to share some thoughts of my teacher with you who is a good mentor for me.

    Read the article

  • How to save during real-time collaboration

    - by dev.e.loper
    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 I thought of: Save on every change. I don't like this solution because it will slow things down on UI and put load on db. When new user joins, trigger save on all other clients. After other clients saved, load document. With this there can be inconsistency still. Any other suggestions would be helpful.

    Read the article

  • How do you properly word a Google search when you don't even have a solution in mind? [closed]

    - by Bruno Romaszkiewicz
    So, I'm stuck on a problem, looking for a solution, my rubber duck can't help me, my co-workers can't help me. Next natural step is research, right? Google can help me, He always can. Or so I'm told. My problem is, I never found much use for Google when looking for a programming solution, it's very useful for finding how to implement one, but when you don't even know where to start, how do you properly word a Google search? Is there any other option?

    Read the article

  • How to stop getting too focused on a train of thought when programming?

    - by LDM91
    I often find myself getting too focused on a train of thought when programming, which results in me having what I guess could be described as "tunnel vision". As a result of this I miss important details/clues, which means I waste a fair amount of time before finally deciding the path I'm taking to solve the task is wrong. Afterwards, I take a step back which almost always results in me discovering what I've missed in a lot less time.. It's becoming really frustrating as it feels like I'm wasting a lot of time and effort, so I was wondering if anyone else had experienced similar issues, and had some suggestions to stop going down dead ends and programming "blindly" as it were!

    Read the article

  • Genetic Algorithm new generation exponentially increasing

    - by Rdz
    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 of 500. My selection will consist in getting the top 20% of 500(based on best fitness). So I get 100 individuals to mate. When I do the crossover I'll get 2 children where both together have 50% of surviving. So far so good. I start the mutation, and everything's ok.. Now when I start choosing the Next generation, I see that I have a big number of children (in this case, 4950 if you wanna know). Now the thing is, every time I run GA, if I send all the children to the next generation, the number of individuals per generation will increase exponentially. So there must be a way of choosing the children to fulfill a new generation without getting out of this range of the initial population. What I'm asking here is if there is anyway of choosing the children to fill the new generations OR should I choose somehow (and maybe reduce) the parents to mate so I don't get so many children in the end. Thanks :)

    Read the article

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

    - by GlenPeterson
    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 time, this can work, but in an interview it's been pretty unsuccessful, if not downright counter-productive. I'm not always comfortable sitting there thinking while the clock ticks away. Is there a checklist or are there techniques to recognize when you understand the problem well enough to start coding? Maybe don't touch the keyboard for the first 5-10 minutes of the problem? At what point do you give up and code a brute-force solution with the hope of reasoning out a better solution later? When is it most productive to think and design more vs. code some experiments to and figure out the design later? Here is a list of techniques for taking a math test and another for taking an oral exam. Is there is a similar list of techniques for handling a programming problem under pressure? ANSWERS: I think this is a valid answer: How To Solve It. I found the link as an answer to Steps to solve or approach towards a solution. There were also some really good tips at Is thinking out loud during an interview really the best strategy?. A great and concise argument for TDD is the first answer to TDD Writing code vs Figuring out the answer to a problem?. My question may be a near-duplicate of that one.

    Read the article

  • Ranking players depending on decision making during a game

    - by tabchas
    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. Is there a way or how would I go about a way to translate some of those factors (leveling up certain skills, purchasing certain items, etc.) into something like a curve that can be plotted on a graph? This game that I would like to implement this is League of Legends. Example: Player is Level 1 in the beginning. Gets a kill very early in the game (he gets gold because of the kill and it increases his "power curve"), and purchases attack damage (gives him more damage which also increases his "power curve". However, the player that he killed (Player 2), buys armor (counters attack damage). This slightly increases Player 2's own power curve, and reduces Player 1's power curve. There's many factors I would like to take into account. These relative factors (example: BECAUSE Player 2 built armor, and I am mainly attack damage, it lowers my OWN power curve) seem the hardest to implement. My question is this: Is there a certain way to approach this task? Are there similar theoretical concepts behind ranking systems that I should read up on? I've seen the ELO system, but it doesn't seem what I want since it simply takes into account wins and losses.

    Read the article

  • How can one find software development work that involves directly the final end user?

    - by RJa
    I've worked in software development for 15 years and, while there have been signficant personal achievements and a lot of experience, I've always felt detached from the man/woman-on-the-street, the every day person, how it affects their lives, in a number of ways: the technologies: embedded software, hidden away, stuff not seen by the everyday person. Or process technology supporting manufactured products the size of the systems, meaning many jobs, divided up, work is abstract, not one person can see the whole picture the organisations: large, with departments dealing with different areas, the software, the hardware, the marketing, the sales, the customer support the locations and hours: out-of-town business parks away from the rest of society, fixed locations, inflexible: 9-5 everyday This to me seems typical of the companies I worked for and see elsewhere. Granted, there are positives such as the technology itself and usually being among high calibre co-workers, but the above points frustrate me about the industry because they detach the work from its meaning. How can one: change these things in an existing job, or compensate for them? find other work that avoids these and connects with the final end user? Job designs tend to focus on the job content and technical requirements rather than how the job aims to fulfil end user needs, is meaningful.

    Read the article

  • How would you tackle a pattern-finding program?

    - by Neil
    Just to be clear, I don't think this should be question better suited for stackoverflow.com simply because there's not a single answer but a wide range of possible solutions, making this question far more subjective in nature. I was curious how you guys would tackle a pattern-finding program, which is to say I'd do the following operations: I enter in some input. Program predicts my next input based on all previous inputs. Rinse. Repeat. Since the amount of input I could provide is so varied, including empty strings, conventional means such as switches or regular expressions are out, since it would require you to have an inkling of information about what to expect. I was thinking about some form of genetic algorithm, yet even then I don't have a clue as to how to approach a problem of this caliber. I think some feedback mechanism would be necessary as well as to let the program know how close it was. Anyone had to do a similar type program before?

    Read the article

  • What is the best way to maintain our programming experiences? [closed]

    - by M3HD1
    Possible Duplicate: how do you remember programming related stuff? During my work experiences, I always met many kind of blocking problems with different technologies. When I remember the efforts I spent to find the solutions I become frustrated and want to find a way to keep all in mind. Generally I keep all the project I made in my Hard Drive, and I usually reuse them when I encounter a problem i already encountered. But this is not to really efficient when you reopen your own code and say: Who is the sucker who wrote this code!? I'm thinking to make my own website in which I can post some tutorials / articles about the problems I met and their solutions. So I keep all in mind and help community. Do you think that it will be a good idea or just a loss of time regarding the actual programming forums?

    Read the article

  • Need simple advice for graph solving problem

    - by sap
    Hi there, a collegue of mine proposed to me an exercise from an online judge website, which is basically a graph solving problem of an evacuation plan on a small town. i dont need the answer (nor do i want it) i just need an advice on which is the best approach to solving it since im kinda new to these kind of problems. the problem consists of town buildings with workers and fallout shelters in case of a nuclear attack. i have to build an algorithm that will assign the workers of each building to one or more fallout shelters but in a way that some shelters wont became too overcrowded while others remain almost empty (else i would just make the workers go to the nearest one). the problem is this: http://acm.timus.ru/problem.aspx?space=1&num=1237 in case its offline heres the google cached version of it: http://webcache.googleusercontent.com/search?q=cache:t2EPCzezs7AJ:acm.timus.ru/problem.aspx%3Fspace%3D1%26num%3D1237+vladimir+kotov+evacuation+problem&cd=1&hl=pt-PT&ct=clnk&gl=pt what i've done so far is for each building get the nearest shelter and move the number of workers from that build equal to the shelter capacity. then move to the next building. but sometimes the number of workers is greater than the shelter capacity, in that case after i iterate through every building, ill just iterate then again apllying the same algorithm until every building has 0 workers in it, problem is this is hardly the best way to solve it. any tip is welcome, please dont feel like im asking for the answer, i just want an advice in the right direction of solving it. thanks in advance.

    Read the article

  • Solving algorithm for a simple problem

    - by maolo
    I'm searching for an algorithm (should be rather simple for you guys) that does nothing but solve the chicken or the egg problem. I need to implement this in C++. What I've got so far is: enum ChickenOrEgg { Chicken, Egg }; ChickenOrEgg WhatWasFirst( ) { ChickenOrEgg ret; // magic happens here return ret; } // testing #include <iostream> using namespace std; if ( WhatWasFirst( ) == Chicken ) { cout << "The chicken was first."; } else { cout << "The egg was first."; } cout << endl; Question: How could the pseudocode for the solving function look? Notes: This is not a joke, not even a bad one. Before you close this, think of why this isn't a perfectly valid question according to the SO rules. If someone here can actually implement an algorithm solving the problem he gets $500 in cookies from me (that's a hell lot of cookies!). Please don't tell me that this is my homework, what teacher would ever give his students homework like that?

    Read the article

  • Need help solving "Disk Error Press any key to restart" after blue screen in XP.

    - by Dennis
    I have had a couple of BSOD's lately and after the last one I got the disk error message. The disk shows up during the BIOS portion of the boot. It is in a Dell Precision 690 so the F12 key gives me a boot menu. I can boot from the utility partition, and if I specifically select the hard drive from the boot menu it will boot fine. Any ideas why if I just try to do an unattended boot, it give the error listed in the title?

    Read the article

  • Windows Domain Chaos - Any Solving Approach

    - by Chake
    we are running an old Window 2003 Server as Domain Controller (DC2003). To safely migrate to Windows 2008 R2 we added a 2008 R2 (DC2008R2) to the domain as domain controller (adprep etc.). After dcpromo on DC2008R2 everything seemed to be ok. The new DC appeared under the "Domain Controlelrs" node. It wasn't checked at this time, if DC2008R2 can REALLY act as domain controller. Later we tried to shutdown DC2003 and ran into a total mess with non functional Exchange and Team Foundation Services. After that I got the job to fix... First i thought it could be an Problem with DC2008R2. So I removed it as Domain Controller and installed a new Windows 2008 R8 Server DC2008R2-2. I ran into similar Problems. I tried a bunch of stuff, but nothign helped. I won't list it, maybe I made an mistake, so I'm willing to redo it with your suggestions. To have a starting point I tried the best practise analyser whicht ended up with 24 "Compatible" and 26 "Not Compatible" tests. From these 26 tests 19 read the same. (I'm translating from german, so that may to be the exact wording) Problem: Using the Best Practise Analyser for Active Directory Domain Services (Active Directory Domain Services Best Practices Analyzer, AD DS BPA) no data can be be gathered using the name of the forest and the domain controller DC2008R2-2. I appreciate any suggestions, this really bothers me.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >