Code Monkey home page Code Monkey logo

algorithms-for-patterns's Introduction

Algorithms for Strings and Patterns

Design and Analysis of Algorithms, Assignment - BS CS Degree Program

This code was written as part of a course assignment for Design and Analysis of Algorithms course during my Bachelor's degree in Computer Science. We were given the choice to either code it in C++ or C. During this course, we executed and tested our code on Ubuntu Linux, directly on the terminal.

In order to compile and execute a CPP file on a Linux terminal, navigate to the directory where the code file is saved and then follow these steps in the terminal:

gcc filename.cpp -o filename-executable

This will create an executable file for your code, within your current directly. You can verify this by either navigating to your current directory in your files or by simply executing an "ls" command in the directory to show the files present there.

Once verified, you can run this executable file using the command:

./filename-executable


This project contains 4 different files, each providing a solution to a separate question statement for the course assignment.

pAq2.cpp is a suggestive improvement for string matching, to Naive search. I have found the Longest Palindronic Subsequence using Knuth Morris Pratt algorithm, for this question
pBq1.cpp is the implementation of KMP algorithm
pBq2.c is an algorithm for finding a pattern in a string using Rabin Karp algorithm
pBq4.cpp is Boyer Moore's Bad Character Heuristic algorithm for pattern matching

Here is the complete solved assignment: i170028_RafshaMazhar_E.pdf


Disclaimer: These may not be the best of the solutions to these problems out there and I am aware that there is always room for improvemet. These were coded by me, 3 years back, in early 2020, when I was still only halfway through my Bachelor's degree. I have only recently decided to start contributing to the open source community and start making an online portfolio so I thought a good way to start could be by publishing my older solutions.

algorithms-for-patterns's People

Contributors

byrafsha avatar rafshamazhar avatar

Stargazers

 avatar

Watchers

 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.