This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Quicksort example in x86_64 Assembly - Linux | |
; Assembler: NASM | |
; Fernando B. Giannasi - jul/2023 | |
section .data | |
DATA dq 1, 9, 2, 8, 3, 7, 4, 6, 5, 0, 70, 69, 68, 67, 66, 65, 1, 9, 2, 8, 3, 7, 4, 6, 5, 0, 70, 69, 68, 67, 66, 65, 1, 9, 2, 8, 3, 7, 4, 6, 5, 0, 70, 69, 68, 67, 66, 65 | |
DATA_LEN equ $ - DATA | |
section .bss |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Simple program emulating UNIX cat | |
; | |
; Assembler: YASM | |
; | |
; Fernando Giannasi | |
; July 09, 2023 | |
section .data | |
SYS_EXIT equ 60 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
section .data | |
EXIT_SUCCESS equ 0 ; successful operation | |
SYS_exit equ 60 ; call code for terminate | |
linefeed db 10 | |
stringRes db "Number of arguments: " | |
section .text | |
global _start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef AHO_CORASICK_HEADER | |
#define AHO_CORASICK_HEADER | |
#include <queue> | |
#include <unordered_map> | |
#include <vector> | |
#include <iostream> | |
// Reference https://www.toptal.com/algorithms/aho-corasick-algorithm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*16 | |
1 4 | |
2 4 | |
3 4 | |
4 5 | |
5 6 | |
6 7 | |
7 8 | |
7 9 | |
6 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 2.8.11) | |
project(Qt5App) | |
# | |
# Qt5 support | |
# | |
# general overview: | |
# * [Modern CMake with Qt and Boost](http://www.kdab.com/modern-cmake-with-qt-and-boost/) | |
# * [Using CMake with Qt 5](http://www.kdab.com/using-cmake-with-qt-5/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef DYNAMIC_BITSET_HEADER | |
#define DYNAMIC_BITSET_HEADER | |
#include <algorithm> | |
#include <functional> | |
#include <iterator> | |
#include <numeric> | |
#include <stdexcept> | |
#include <string> | |
#include <sstream> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <algorithm> | |
#include <array> | |
#include <iostream> | |
#include <string> | |
#include <utility> | |
//print instructions | |
void instructions(const std::array<std::array<char, 3> ,3>& board) | |
{ | |
std::cout << "Choose a cell numbered from 1 to 9 as below\n and play\n\n"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// based on https://users.cs.fiu.edu/~weiss/dsaa_c++4/code/AvlTree.h | |
#ifndef AVL_TREE_HEADER_MAIN | |
#define AVL_TREE_HEADER_MAIN | |
#include <algorithm> | |
#include <initializer_list> | |
#include <iostream> | |
#include <iterator> | |
#include <memory> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef BINARY_HEAP_HPP | |
#define BINARY_HEAP_HPP | |
#include <algorithm> | |
#include <functional> | |
#include <initializer_list> | |
#include <iostream> | |
#include <stack> | |
#include <type_traits> | |
#include <vector> |
NewerOlder