Problem solving limitation

Started by
10 comments, last by Orymus3 10 years, 7 months ago

Hi All,

I have experience with C++,..etc done several software on mobile, desktop, computer vision, using java,..etc.

I had an interview with qualcomm, they said " Ahmed did in software fine, but its mainly his limited problem solving capabilities".

Yesterday I saw that problem :

Given a list and a number k, invert first k elements and leave next k elements. Repeat this throughout the list. By inverting I mean, changing the sign of the number.

I tried to think about it, like, just partition the array into K elements, and merge them, like merging in merge sort, I found someone solved it in two lines of for loop, I felt ashamed really.
I don't know why I have limited problem solving, I even have Bsc in EE..etc :/
How do I improve it ?
Is it because of I take anti-depressants,..etc ?
Advertisement

Practice. Problem solving is a skill you can work on and improve.

Find lots of problems and try to solve them. Then try to solve them in a different way. Then discuss your solutions with others and find out what other people think of your solutions; what was good about your solutions, what could be improved, what alternative solutions would others use, etc.

Have you ever tried any of the problems from Project Euler?

- Jason Astle-Adams

I find euler is really hard for me. :(

How did you like my solution to the above mentioned problem ?

What analysis did you get from my way of solving it ?

Being a programmer is being a constant problem-solver. Don't feel bad, because problems some people can solve in minutes can take others hours. That's just my impression.

Anyway, artists tend to get paid less than programmers but problem-solving is one of the reasons I decided to major in art - I would rather be a simple creator than a problem-solver.
As jbadabs says, practicing will help. Over time, you'll be exposed to more techniques for solving problems - more tools to put in your coders toolbox.

You've picked up your "array partitioning" tool, which is an intuitive way to think about it -- breaking the data up into the different groups, inverting half the groups, then merging them again.

There's many other tools that other coders might've picked up though. E.g. You could go straight for modulo, iterating through all elements, testing something like index%(k*2)>=k.
Another programmer might divide the index by k and test if the result is odd or even ANDing with the bitmask 1.

Depending on which tools you've practiced with, the first solution to jump to mind will be different. As you practice with more tools, more solutions will present themselves to you.


I find euler is really hard for me.

It's supposed to be, if it were easy you would learn very little from solving the problems. Solve logic and word problems. Solve maths problems. Solve puzzles. Solve programming problems.

Once you have solved hundreds or even thousands of problems, especially if you take the time to analyse your solutions and look at alternatives, you will be a good -- or maybe even great -- problem solver.

- Jason Astle-Adams

Your inputs are really really awesome!! Especially Hodgman.

@Hodgman, When I thought about the modulo and the division methods, I felt really really stupid, I didn't know why I thought about that approach, Actually, I was thinking about a linear solution, that's why I tried to avoid processing the array by any other methods that would result in O(N^2) or more. How about that thinking approach ?

@jbAdams, I love your ways of reviewing books, would you suggest some that you really read and know what they have inside it, that may be helpful ?

except CLRS book :).

Thanks so much!

Yes, practice practice practice.

We've got a share of candidates lacking problem solving skills.

They can write and make apps,

but reverse those singly linked lists,

and they got hitches.

I started solving for project euler, and I'm in problem three.

Most of the problems are math related computing problems, but I don't see problems like the one that I have faced in my first post. Problems like reversing linked list,..etc.

Game Programming is the process of converting dead pictures to live ones .

Technically, problem-solving is not programming-related per se.

It's all about observation and dissection of the 'variables' at work, and how to apply 'tools' to create a solution.

While its true that programming applies here, it works also in real life.

Is your problem only related to programming, or are you finding it hard to come up with the most efficient solution to 'other problems' such as games/puzzles?

This topic is closed to new replies.

Advertisement