Giter Club home page Giter Club logo

july-22-2015's Introduction

July 22, 2015

Problem 1

Write code to remove duplicates from an unsorted linked list.

#####Follow up How would you solve this problem if a temporary buffer is not allowed?

Problem 2

Implement an algorithm to find the nth to last element of a singly linked list.

Problem 3

Implement an algorithm to delete a node in the middle of a single linked list, given only access to that node.

#####Example: ######Input: the node ‘c’ from the linked list a->b->c->d->e ######Result: nothing is returned, but the new linked list looks like a->b->d->e

Problem 4

You have two numbers represented by a linked list, where each node contains a single digit. The digits are stored in reverse order, such that the 1’s digit is at the head of the list. Write a function that adds the two numbers and returns the sum as a linked list.

#####Example ######Input: (3 -> 1 -> 5) + (5 -> 9 -> 2) ######Output: 8 -> 0 -> 8

Problem 5

Given a circular linked list, implement an algorithm which returns node at the beginning of the loop.

#####Definition Circular linked list: A (corrupt) linked list in which a node’s next pointer points to an earlier node, so as to make a loop in the linked list.

#####Example ######Input: A -> B -> C -> D -> E -> C [the same C as earlier] ######Output: C

Problem 6

Given a linked list, write a function to reverse it.

#####Example #####Input: A -> B -> C -> D #####Output: D -> C -> B -> A

Problem 7

Detect and remove loop in a linked list.

july-22-2015's People

Contributors

samfcabral avatar ssahu avatar hath995 avatar

Watchers

James Cloos avatar  avatar  avatar Andrew Pohl avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.