Solves a given NxN wordsearch in under 0.3 seconds at most using Rabin-Karp string algorithm.

Overview

ASSIGNMENT 2

The Information of the Creator:

ASSIGNMENT 2
Author: Lukas Waschuk
CCID: lwaschuk
Date: 03-20-2021

The Purpose of Your Program:

This program was created to help solve a NxN word search within the blink of a eye (under 0.3 seconds at most). This program will search all 8 possible directions and output a text file (or print into an existing file of the users choice) containing the locations and directions of all the words.

The Exact Commands We Need to Run Your Code:

The program was written in C and is optimally compiled using GNU compiler (GCC). The program is ran by simply typing make in the command line while will create all the required files and it will create an executable called wordSearch2D. To run the executable type:

       <./wordSearch2D -p *puzzle_file* -l word_length -w wordlist_file [-o solution_file]>   

into the command line. You will need to supply a NxN puzzle file, a word list containing all the words you seek. All the words must be the same length and must not exceed the length of the puzzle file you entered. For the final flag <-l> you must specify the length of the words you are attempting to search. Assuming you met all the above specifications the output file will be created as "output.txt" or it can be given a name using the -o flag.

The Structure of the Solution File:

The solution file will contain a list of locations along with the directions of the input word list, in the same order they were entered.
Format:
x-coordinate = columns
y-coordinate = rows

word;(y,x);direction 

The Files Submitted In Your Assignment, How They Are Structured, And What They Do:

The files uploaded are:
wordSearch2D.c is the main program which will extract all the information from the input text files, error check them, and save the output to the text file.
puzzle2D.c is the logic behind solving the puzzle by travering every direction and comparing substrings of a line using the Rabin-Karp string comparison algorithm.
puzzle2D.h is the header file to link the functions of puzzle2D.c into wordSearch2D.c.
Makefile is the file that links and compiles the program and headers together, by typing make in the command line.
puzzle.txt is a puzzle text file to sample the program.
wordlist.txt is a wordlist file to use with the above puzzle to sample the program.
expected_soln.txt is the solution that the program will give.
sample_test.sh is the script that can be used to run the program after is it compiled.

References (e.g., any online resources you used in accordance to the course policy):

My references come from CMPUT 201 lecture slides, the textbook C PROGRAMMING by K N KING, and my Kabin-Karp Algorithm was sourced and heavily referenced from the CMPUT 204 textbook CRLS: Introduction to Algorithms.

Owner
Lukas Waschuk
Lukas Waschuk
header-only UTF-8 string functions based on STL-string

utf8_xxx header-only UTF-8 string functions based on STL-string size_t utf8_len(const std::string& _Str) std::string utf8_sub(const std::string& _Str,

Voidmatrix 2 Dec 27, 2021
C Program to input a string and adjust memory allocation according to the length of the string.

C-String C Program to input a string and adjust memory allocation according to the length of the string. With the help of this program, we have replic

Kunal Kumar Sahoo 1 Jan 20, 2022
Just loop forever, with sleep for specified seconds

loopever Just loop forever, with sleep for specified time Build & Install $ mkdkir build $ cd build $ cmake .. $ make $ make install Run $ loopever 0

Tomohito Nakayama 1 Oct 24, 2021
Ramp is a HID attack program that steals all connected WiFi passwords within 13 seconds.

Ramp Ramp is a HID attack program that steals all connected WiFi passwords within 13 seconds. Tested Windows 10 Warning Ramp has been created for the

Md. Ridwanul Islam Muntakim 18 Jun 10, 2022
The given files contains a coded algorithm for a program of "OMR Evaluation" With negative marking below are brief info regarding its feature

OMR-Evalution The given files contains a coded algorithm for a program of "OMR Evaluation" With negative marking below are brief info regarding its fe

Harsh Shrivastava 4 May 14, 2022
Hide a process,port,self under Linux using the ld_preload

vbackdoor 中文 Hide a process,port,self under Linux using the LD_PRELOAD rootkit. compile the library git clone https://github.com/veo/vbackdoor.git cd

veo 88 Aug 8, 2022
Protect files under a specific folder from deleting or moving by explorer.exe.

Explorer-Delete-Protection Protect files under a specific folder from deleting or moving by explorer.exe. Requierments: Microsoft Detours Library - ht

null 4 Jan 2, 2022
Interface between the Artery V2X Simulation Framework and DuT (Device under Test).

INFM HIL Interface Interface between the Artery V2X Simulation Framework and DuT (Device under Test). The Interface should support standards like: CAN

Laki 4 Dec 21, 2021
Orca - Advanced Malware with multifeatures written in ASM/C/C++ , work on all windows versions ! (some features still under developing and not stable)

About Orca Orca is an Advanced Malware with multifeatures written in ASM/C/C++ features Run in Background (Hidden Mode) Records keystrokes and saves t

anas 166 Aug 3, 2022
TAFuzzer: Effective and Efficient Targeted Fuzzing framework for Smart Contract Vulnerability Detection (CCS2022a Under Review).

TAFuzzer An effective and efficient targeted fuzzing framework for smart contract vulnerability detection. Requirements TAFuzzer is supported on Linux

null 2 Feb 7, 2022
A repository containing our learnings and implementations for the project "Anchor: The Docker Clone" under IEEE-NITK

Anchor: The Docker Clone A repository containing our learnings and implementations for the project "Anchor: The Docker Clone" under IEEE-NITK Currentl

Rakshita Varadarajan 1 Feb 7, 2022
Scans a given text file for any misspelled words

speller-program Scans a given text file for any misspelled words Directories: dictionaries: a file that contains all words in the dictionary texts: co

Martin Guevara 1 Oct 14, 2021
A C++ implemented set of 8,16,32,64 bit cyclic redundancy check (CRC) functions conforming to the CRC spec given by AUTOSAR

A C++ implemented set of 8,16,32,64 bit cyclic redundancy check (CRC) functions conforming to the CRC spec given by AUTOSAR. Written in C++ and compiled as a 'C++ addon' for use in JavaScript. Available on NPM.

Richard Haar 3 Jul 13, 2022
This is for interfacing rasberry-pi's (2 cards) with an arduino for sending raw data to form the close loop system to avoid motor heating by acting on a given temperature.

This is for interfacing rasberry-pi's (2 cards) with an arduino for sending raw data to form the close loop system to avoid motor heating by acting on a given temperature. Interface is explained through a master slave approach and client server approach. another camera is used with OPEN-CV platform to interface and collect data aswell.

Younes HAMZA 2 Oct 25, 2021
A presentation about Nintendo 64 development, given at Inércia 2021

Reflective Regret This repository contains a lot of stuff regarding the "Reflective Regret: Adventures in N64 Homebrew Development" presentation I gav

Buu342 9 Apr 11, 2022
Examples for the "Introduction to programming" course given by me and @bzareva @ Faculty of Mathematics and Informatics, Sofia University (2021/22)

Теми от практикумите по "Увод в програмирането", зимен семестър 2021/2022, спец. "Информатика", група 5 Тема 1 (04.10.2021) : Променливи. Типове проме

null 6 May 4, 2022
Contribute a Data Structure you coded or solve the problems given in the Description.md file in any language! Happy coding!

Pro Lang Contribute a Data Structure you coded or solve the problems given in the Description.md file (can be found in the both the folders) in any la

IEEE-IAS VIT 1 Jan 16, 2022
A Valorant Internal Cheat by StuzziKLL's source and given some small adjustments by me.

Valorant Internal Cheat A Valorant Internal Cheat by StuzziKLL's source and given some small adjustments by me. Picture of the menu: How to use the Va

xEnething 38 Aug 2, 2022