Skip to content

Instantly share code, notes, and snippets.

View porimol's full-sized avatar
🎯
Focusing

Porimol Chandro porimol

🎯
Focusing
  • Warsaw, Poland
View GitHub Profile
@porimol
porimol / naive_string_matching.c
Created July 25, 2017 13:40
C program for Naive Pattern Searching algorithm
#include<stdio.h>
#include<string.h>
void search(char *pat, char *txt)
{
int i = 0;
int M = strlen(pat);
int N = strlen(txt);
// A loop to slide pat[] one by one
@porimol
porimol / lexical_analyzer.c
Last active August 7, 2017 15:44
Lexical analyzer using c programming language
#include <stdio.h>
#include <string.h>
void lexicalAnalyzer(char S[]);
int isIdent(char ch);
int isAlpha(char ch);
int isDigit(char ch);
int isOperator(char ch);
int isDel(char ch);
void isKeyword();
@porimol
porimol / coin_changing.c
Created July 18, 2017 13:19
Coin changing dynamic program in c
#include<stdio.h>
// Returns the count of ways we can sum S[0...m-1] coins to get sum n
int count( int S[], int m, int n )
{
// If n is 0 then there is 1 solution (do not include any coin)
if (n == 0)
return 1;
// If n is less than 0 then no solution exists
@porimol
porimol / python_type_hinting.py
Created July 12, 2017 07:10
Python type hinting example
def greeting(name: str)->int:
return "Hello "+name
# funtiom calling with correct parameter type
greeting("Porimol")
# function calling with wrong parameter type
greeting(420)
@porimol
porimol / on_time_performance.sql
Created June 4, 2017 14:44
On ttime performance
CREATE TABLE airline.on_time_performance (
id integer NOT NULL,
"Year" integer,
"Quarter" integer,
"Month" integer,
"DayofMonth" integer,
"DayOfWeek" integer,
"FlightDate" integer,
"UniqueCarrier" integer,
"AirlineID" integer,
@porimol
porimol / bubble_sort.cpp
Created May 30, 2017 07:18
Bubble Sort Algorithm Implementation Using C++
/**
* @file bubble_sort.cpp
* @author Porimol Chandro, CSE 32D, World University of Bangladesh(WUB)
* @date 30/05/2017
*
* @brief Bubble Sort Algorithm Implementation.
*/
#include <iostream>
@porimol
porimol / selection_sort.cpp
Created May 23, 2017 08:37
Selection Sort Algorithm Implementation Using C++
/**
* @file selection_sort.cpp
* @author Porimol Chandro, CSE 32D, World University of Bangladesh(WUB)
* @date 23/05/2017
*
* @brief Selection Sort Algorithm Implementation.
*/
#include <iostream>
@porimol
porimol / insertion_sort.cpp
Last active May 23, 2017 07:19
Insertion Sort Algorithm Implementation Using C++
/**
* @file insertion_sort.cpp
* @author Porimol Chandro, CSE 32D, World University of Bangladesh(WUB)
* @date 23/05/2017
*
* @brief Insertion Sort Algorithm Implementation.
*/
#include <iostream>
@porimol
porimol / linear_search.cpp
Created May 16, 2017 09:27
Linear Search Algorithm Implementation Using C++
/**
* @file linear_search.cpp
* @author Porimol Chandro, CSE 32D, World University of Bangladesh(WUB)
* @date 16/05/2017
*
* @brief Linear Search Algorithm Implementation.
*/
#include <iostream>
@porimol
porimol / binary_search.cpp
Created May 16, 2017 09:12
Binary Search Algorithm Implementation Using C++
/**
* @file binary_search.cpp
* @author Porimol Chandro, CSE 32D, World University of Bangladesh(WUB)
* @date 16/05/2017
*
* @brief Binary Search Algorithm Implementation.
*/
#include <iostream>