3 ms·
This is a very promising idea. I always crack when it comes to algorithm type question. I am aware of some of the run of the mill ones like, write a palindrome
by notastartup 12y ago
This is a very promising idea.
I always crack when it comes to algorithm type question. I am aware of some of the run of the mill ones like, write a palindrome detector, bubble sort.
However, I still can't figure out the crazy hard ones like:
In a pyramid of numbers, write an algorithm to find the path to the biggest sum. Write a method to produce pascal's triangle. Given a grid, where X = wall, O = space, write an algorithm to figure how big the room is and so on....
My biggest gripe is knowing that these type of questions will kick my ass and not being able to prepare because you are already supposed to know this from your comp sci courses, which I've never been to as I have been self taught through making my own software, and learning as I went along.
- mquander 12y agoIf you're a naturally competitive sort of person, you should try doing TopCoder and Google Code Jam. I also skipped formal CS education and when I was roughly at your level of ability I found that doing TopCoder SRMs in particular taught me a nice toolbox of common approaches to algorithmic problems.
- yincrash 12y agotree of numbers -> keep track of the sum as you work your way down the branch. every visit to a node, check if that sum of the parent plus your current node is larger your your current max. if it is, replace your max, keep traversing your tree.