Code Monkey home page Code Monkey logo

diff-algorithms's Introduction

Diff Algorithms

This repo is a collection of several diff algorithms and Java implementation including native dynamic programming method, A* search, Myers Algorithm and RWS-diff algorithm for comparing tree structures.

Dynamic Programming

Popular algorithm especially in interview for SES problem, O(n^2) time complexity.

A* Search

Inspired by a blog: https://thume.ca/2017/06/17/tree-diffing/#example-implementation

This algorithm works better than the native dynamic solution which needn't walk through the whole graph. The time complexity is O(n * e^2), e is the edit distance.

Myers Diff Algorithm

Paper: An O(ND) Difference Algorithm and Its Variations by EUGENE W. MYERS See: http://www.xmailserver.org/diff2.pdf

RWS-diff Algorithm

Paper: RWS-Diff: Flexible and Efficient Change Detection in Hierarchical Data See: https://db.in.tum.de/~finis/papers/RWS-Diff.pdf

This algorithm has a O(n*log(n)) time complexity

diff-algorithms's People

Contributors

poytr1 avatar

Stargazers

Norbert Sándor avatar  avatar Anand Thakker avatar

Watchers

James Cloos avatar  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.