background preloader

Top 10 Algorithms for Coding Interview

Top 10 Algorithms for Coding Interview
PDF: Update History, Latest version (8/1/2016) The following are the common subjects in coding interviews. As understanding those concepts requires much more effort, this tutorial only serves as an introduction. The subjects that are covered include: 1) String/Array/Matrix, 2) Linked List, 3) Tree, 4) Heap, 5) Graph, 6) Sorting, 7) Dynamic Programming, 8) Bit Manipulation, 9) Combinations and Permutations, and 10) Math Problems. I highly recommend you to read "Simple Java" first, if you need a brief review of Java basics. If you want to see code examples that show how to use a popular API, you can use JavaSED.com. 1. An algorithm problem's input is often a string or array. 2. Common methods to solve matrix related problem include DFS, BFS, dynamic programming, etc. 3. The implementation of a linked list is pretty simple in Java. Two popular applications of linked list are stack and queue. Stack Queue The Java standard library contains a class called "Stack". 4. 4.1 Tree 4.2 Heap 4.3 Trie 5. 6.

http://www.programcreek.com/2012/11/top-10-algorithms-for-coding-interview/

Related:  Algorithmscode & programminginterviews

Jeff Erickson's Algorithms This page contains lecture notes and other course materials for various algorithms classes I have taught at the University of Illinois, Urbana-Champaign. The notes are numbered in the order I cover the material in a typical undergraduate class, wtih notes on more advanced material (indicated by the symbol ♥) intersprsed appropriately. New Jan 2015: In addition to the algorithms notes I have been maintaining since 1999, this page also contains new notes on "Models of Computation", which cover a small subset of the material normally taught in undergraduate courses in formal languages and automata. I wrote these notes for a new junior-level course on "Algorithms and Models of Computation" that Lenny Pitt and I developed, which is now required for all undergraduate computer science and computer engineering majors at UIUC. You can see this material in context at my Fall 2014 course web site.

10 More Puzzle Websites to Sharpen Your Programming Skills My recently published Six Revision guest post, 10 Puzzle Websites to Sharpen Your Programming Skills, got a great response, hitting the front page of Hacker News, Reddit, and doing fairly well on Digg too. Lots of comments were left pointing out some sites which weren't included in my list, so I'm following up here with a list of 10 more top programming puzzle websites: 1. Code Chef Lectures 1 and 2: Analysis of Algorithms I just finished watching the last lecture of MIT's "Introduction to Algorithms" course. Having a great passion for all aspects of computing, I decided to share everything I learned with you, my dear readers! This is the first post in an article series about this course. As I wrote earlier, I am very serious about watching video lectures. If they are math-intensive, I usually take notes as if I were in the classroom. Lectures in this course were exactly like that -- logarithms, big-o's, thetas, expectations, and all the other math guys fighting with each other on the blackboards.

Become a Programmer, Motherfucker If you don't know how to code, then you can learn even if you think you can't. Thousands of people have learned programming from these fine books: Learn Python The Hard Way Learn Ruby The Hard Way Learn Code The Hard Way Reverse a linked list in java « Think ! If you search for it you will get millions of solutions but sadly (like many things in internet) the first few solutions seem unintuitive and unnecessarily complex for such a simple problem, not sure why, anyway putting mine out there for somebody to point out why I should go for a more complex solution. [in java for a change] Idea : Use two references and reverse their links and proceed till we reach the end public void reverse_iterative { if(isEmpty()) { return;} //curr == null Node currNode,nextNode , loopNode; currNode = head; nextNode = head.next; head.next = null; while(nextNode !

Breaking down Amazon’s mega dropdown The hover effects on Amazon’s big ‘ole “Shop by Department” mega dropdown are super fast. Look’it how quick each submenu fills in as your mouse moves down the list: It’s instant. I got nerd sniped by this. Most dropdown menus have to include a bit of a delay when activating submenus. CS 240 Computer Science II Syllabus Spring 2008 SYLLABUS This page last changed 6/19/08 Objectives: To develop skills in the design and development of computer software continuing to utilize an object-oriented language, packages, modules and libraries. To develop understanding and build skills in the implementation and use of common data structures used in software development through data abstraction. To further study the Java language and learn to use UNIX as a software design environment.

We've Open-Sourced Everything - CodeCombat Blog CodeCombat is a programming game for learning to code; a multiplayer coding challenge arena for sharpening your skills; a Y-Combinator-funded startup; and as of this weekend, the largest open source CoffeeScript project and a fantastic way to get into open source and game development. Whether you’re a novice programmer wanting to figure out this GitHub thing or an open source guru looking for something to sink your teeth into, check out our GitHub and join over two hundred CodeCombat Archmages in building the best programming game ever. Yes, we just open-sourced the last year of our lives–all the code, art, and music for CodeCombat–under the MIT and Creative Commons licenses. “Wait. You’re a for-profit startup, but you’re giving away all of your code?

Adnan Aziz Elements of Programming Interviews We're excited to release a free soft copy sampler of EPI. Specifically, this PDF shows the organization, content, style, topics, and quality of our book. Amit, Tsung-Hsien and I have completed "Elements of Programming Interviews"! 7 Ways to Make Your Own Video Game Steps Laying the Foundations <img alt="Image titled Make Your Own Video Game Step 1" src=" width="728" height="546" class="whcdn" onload="WH.performance.clearMarks('image1_rendered'); WH.performance.mark('image1_rendered');">1Pick your genre. While every successful game is unique in its own way, almost all of them fit into a specific genre.

Markov Chains – Explained Markov Chains is a probabilistic process, that relies on the current state to predict the next state. For Markov chains to be effective the current state has to be dependent on the previous state in some way; For instance, from experience we know that if it looks cloudy outside, the next state we expect is rain. We can also say that when the rain starts to subside into cloudiness, the next state will most likely be sunny.

10 places where anyone can learn to code Teens, tweens and kids are often referred to as “digital natives.” Having grown up with the Internet, smartphones and tablets, they’re often extraordinarily adept at interacting with digital technology. But Mitch Resnick, who spoke at TEDxBeaconStreet, is skeptical of this descriptor. Sure, young people can text and chat and play games, he says, “but that doesn’t really make you fluent.” Mitch Resnick: Let's teach kids to code Fluency, Resnick proposes in this TED Talk, comes not through interacting with new technologies, but through creating them. Efficient binary tree traversal with two pointers without using a stack - debforit In this article, we will be discussing about space complexity optimized binary tree traversal techniques. Four modes of traversals are used quite often in a binary tree. They are pre-order walk, in-order walk, post-order walk and level first walk. Except the level first traversal, all the others are recursive and hence require a stack for traversal. We would talk here about in-order traversal. Our analysis can be applied to the other two traversal procedures as well.

Related: