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
CREATE TABLE `book` ( | |
`ISBN` int(11) NOT NULL AUTO_INCREMENT, | |
`BookName` varchar(45) NOT NULL, | |
`Author` varchar(45) NOT NULL, | |
`Description` varchar(1024) DEFAULT 'Null', | |
`Category` varchar(45) NOT NULL, | |
`SubCategory` varchar(45) DEFAULT NULL, | |
`InHotlist` tinyint(1) DEFAULT 0, | |
`BookImage` varchar(256) NOT NULL, | |
`ReleasedTime` timestamp(6) NULL DEFAULT current_timestamp(6), |
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
Isle of Man 1 | |
Faroe Islands 1 | |
Bermuda 1 | |
Tuvalu 1 | |
Brunei 1 | |
Gaza Strip 1 | |
Gibraltar 1 | |
Niue 1 | |
Nauru 1 | |
Macau 1 |
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
import random as rd | |
""" This is the simplest searching algorithm. | |
All elements checked in data one by one. | |
If value is found in array, its index is returned. | |
If not found, function returns -1. | |
Complexity of this algorithm is O(n) | |
In the best case scenerio, value can be found in first | |
index. | |
In the worst case scenirio, value is found in last index""" |
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
import random as rd | |
''' Complexity : O(n^2) | |
In the worst case, the function looks and inverse the elements | |
(n * (n-1))/2 times. (Reverse order situation) | |
~1/2N^2 compares and ~1/2N^2 exchanges. | |
In the best case, the array is sorted. So, we do not make any | |
inversion operation. We just iterates the array n times and | |
makes N-1 compares. So, our complexity is O(n). | |
On average case, insertion sort uses ~1/4N^2 compares and |
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
import random as rd | |
''' Complexity : O(n^2) | |
It looks at each elements and makes comparision | |
like (n-1), (n-2), ..., 1 | |
So, if we sum up all comparisions, the result will be (n * (n-1)) / 2 | |
Because of the summation, the complexity will be O(n^2)''' | |
def selectionSort(arr): |
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 <stdio.h> | |
#include <stdlib.h> | |
#define FALSE 0 | |
#define TRUE 1 | |
typedef struct { | |
int info; | |
} DATA; | |
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
/* | |
* author: Gökhan Özeloğlu | |
* | |
* date: 10.10.2018 | |
* | |
* code: reverse operation in C language | |
* | |
* email: [email protected] | |
*/ |