diff --git a/Algorithm/Bit manipulation/Binary_facts.txt b/Algorithm/Bit manipulation/Binary_facts.txt index d18ffa63..98b94181 100644 --- a/Algorithm/Bit manipulation/Binary_facts.txt +++ b/Algorithm/Bit manipulation/Binary_facts.txt @@ -6,5 +6,5 @@ example: 4 -> 100 5 -> 101 - So, we can quickly check a number is odd or not using binary ans(&). + So, we can quickly check a number is odd or not using binary and(&). if the result is non-zero then the given number is odd, else the result is 0 then even diff --git a/Algorithm/Bit manipulation/ip_hash.cpp b/Algorithm/Bit manipulation/ip_hash.cpp index 0622fa5d..52807aa5 100644 --- a/Algorithm/Bit manipulation/ip_hash.cpp +++ b/Algorithm/Bit manipulation/ip_hash.cpp @@ -1,4 +1,4 @@ -//Difference between logical & arithmatic shift -> +//Difference between logical & arithmetic shift -> // https://stackoverflow.com/questions/44694957/the-difference-between-logical-shift-right-arithmetic-shift-right-and-rotate-r //Logical shift correspond to (left-shift) multiplication by 2, (right-shift) integer division by 2 diff --git a/Algorithm/Dynamic Programming/Factorial/README.md b/Algorithm/Dynamic Programming/Factorial/README.md index e75a897b..ce4771b4 100644 --- a/Algorithm/Dynamic Programming/Factorial/README.md +++ b/Algorithm/Dynamic Programming/Factorial/README.md @@ -1,2 +1,2 @@ -#### As solving Factorial is a non-overloaping problem, so dynamic programming won't help us here, but we can dynamic approch for series of factorial (1! + 2! + 3! + 4!) -#### For regular approch go to -> [Sazin's github](https://github.com/SazinSamin/Samin_Reading_Room/tree/main/Algorithm/miscellaneous/Factorial) +#### As solving Factorial is a non-overloaping problem, so dynamic programming won't help us here, but we can dynamic approach for series of factorial (1! + 2! + 3! + 4!) +#### For regular approach go to -> [Sazin's github](https://github.com/SazinSamin/Samin_Reading_Room/tree/main/Algorithm/miscellaneous/Factorial) diff --git a/Algorithm/Dynamic Programming/Fibonacci/README.md b/Algorithm/Dynamic Programming/Fibonacci/README.md index 70228be3..6c17aac3 100644 --- a/Algorithm/Dynamic Programming/Fibonacci/README.md +++ b/Algorithm/Dynamic Programming/Fibonacci/README.md @@ -1 +1 @@ -### Fibonacci regular loop & recursive approch -> [Solution](https://github.com/SazinSamin/Samin_Reading_Room/tree/main/Algorithm/miscellaneous/Fibonacci). +### Fibonacci regular loop & recursive approach -> [Solution](https://github.com/SazinSamin/Samin_Reading_Room/tree/main/Algorithm/miscellaneous/Fibonacci). diff --git a/Algorithm/Dynamic Programming/Kadane's_algorithm/0001_Kadane's.cpp b/Algorithm/Dynamic Programming/Kadane's_algorithm/0001_Kadane's.cpp index 313ec036..10f41027 100644 --- a/Algorithm/Dynamic Programming/Kadane's_algorithm/0001_Kadane's.cpp +++ b/Algorithm/Dynamic Programming/Kadane's_algorithm/0001_Kadane's.cpp @@ -10,7 +10,7 @@ class Solution { int max_end = 0, max_sum = INT_MIN; // we can also get the subarray starting & ending value, - // comment out commnet statement and get the result. + // comment out comment statement and get the result. // int start = 0, stop = 0; for(int i=0; i 0){ i = array[i - 1]; diff --git a/Algorithm/README.md b/Algorithm/README.md index 66317cd5..4c503683 100644 --- a/Algorithm/README.md +++ b/Algorithm/README.md @@ -1,10 +1,10 @@ ## Floyed cycle detection algorithm.... - In case of measuring the loop length we can use this algorithm. - - uVa 350 sudo random number generation problem solve with this algorthm. where in this problem we have find out when the generated number will repeat again because in computer generated random number is bounded by modulus + - uVa 350 sudo random number generation problem solve with this algorithm. where in this problem we have find out when the generated number will repeat again because in computer generated random number is bounded by modulus - You can understand the problem if you see the problem -> https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=286 - - One thing I observe when solve this problem, as we know the speed of fast pointer is twice than the slow pointer, so if there is loop then when the slow pointer reaches at the end of list then fast pointer also reaches to that position by it 2nd iteration. As there is loop or the number reapeated after a time, so when fast pointer 1st time reaches at the end of loop, then it's again get the number in where it start it's journey, which will ignite fast pointer 2nd iteration. + - One thing I observe when solve this problem, as we know the speed of fast pointer is twice than the slow pointer, so if there is loop then when the slow pointer reaches at the end of list then fast pointer also reaches to that position by it 2nd iteration. As there is loop or the number repeated after a time, so when fast pointer 1st time reaches at the end of loop, then it's again get the number in where it start it's journey, which will ignite fast pointer 2nd iteration. Another thing when the fast pointer reaches at the end then the slow pointer will be in the middle of the list because you know fast pointer has twice speed than the slow pointer. After then fast pointer reaches end of the list, as list has loop or reapeted number it will start it 2nd iteration, on the other hand slow pointer start it's journey to the second half. And as fast pointer has speed twice of slow, it will be at the end of the list when the slow pointer also in the end of list. And both pointer value will match. diff --git a/Algorithm/Recursion/CGD(Greatest Common Divisior)/README.md b/Algorithm/Recursion/CGD(Greatest Common Divisior)/README.md index 7a18336b..2ae28bee 100644 --- a/Algorithm/Recursion/CGD(Greatest Common Divisior)/README.md +++ b/Algorithm/Recursion/CGD(Greatest Common Divisior)/README.md @@ -1,2 +1,2 @@ # Gretest common divisor -### [Read Wikipedia for better explaination](https://en.wikipedia.org/wiki/Greatest_common_divisor) +### [Read Wikipedia for better explanation](https://en.wikipedia.org/wiki/Greatest_common_divisor) diff --git a/Algorithm/Sorting/Couting sort/README.md b/Algorithm/Sorting/Couting sort/README.md index d328a4be..a1d6d770 100644 --- a/Algorithm/Sorting/Couting sort/README.md +++ b/Algorithm/Sorting/Couting sort/README.md @@ -1,9 +1,9 @@ https://www.youtube.com/watch?v=uvOe510RmWc&t=717s ----- This video explaination is good. Please see full video. +---- This video explanation is good. Please see full video. -#### Couting sort +#### Counting sort - + 1. First we have make two arrays, one for counting each elements in the array, another for storing the output. @@ -11,17 +11,17 @@ output. 2. Count each element from the given array and store in the count array. 3. - + 3. Next add first element with next element & put in the next element array index. This will give us the position of that value from where to where. - Like look at this below array, here in index 1 we have a value 2, that means the index 1 actullay represent element 1, and this element 1 will be store in first 2 position (0 and 1), + Like look at this below array, here in index 1 we have a value 2, that means the index 1 actually represent element 1, and this element 1 will be store in first 2 position (0 and 1), the next index is 2, which have value 3, this has difference (3 - 2 = 1) which means it have only 1 value, which location is next (so after 0 and 1) it will be 2. - + 4. - + diff --git a/Algorithm/Sorting/Heap_sort.cpp b/Algorithm/Sorting/Heap_sort.cpp index cc947bd4..67eb8bff 100644 --- a/Algorithm/Sorting/Heap_sort.cpp +++ b/Algorithm/Sorting/Heap_sort.cpp @@ -4,7 +4,7 @@ #include using namespace std; -//Swaping two elements +//Swapping two elements void swap(int *a, int *b){ int temp = *a; *a = *b; diff --git a/Algorithm/Sorting/Merge_Sort/Merge_Sort.cpp b/Algorithm/Sorting/Merge_Sort/Merge_Sort.cpp index c1482140..f118c706 100644 --- a/Algorithm/Sorting/Merge_Sort/Merge_Sort.cpp +++ b/Algorithm/Sorting/Merge_Sort/Merge_Sort.cpp @@ -1,4 +1,4 @@ -//Merge sort implementaion +//Merge sort implementation //This code sometimes crash for small data //And give undefined result diff --git a/Algorithm/Sorting/README.md b/Algorithm/Sorting/README.md index f46e8fd4..f287e962 100644 --- a/Algorithm/Sorting/README.md +++ b/Algorithm/Sorting/README.md @@ -20,4 +20,4 @@ Link -> MyCodeSchool https://www.youtube.com/watch?v=COk73cpQbFQ&list=PL2_aWCzGM linear complexity is the need. #### -Practical information. - Sorting in Dart progamming language implementated as when the difference between right & left value is 32 or less, they use regular insertion sort. But if the difference avobe the level then thay use Dual-Pivot Quicksort algorithm. + Sorting in Dart programming language implemented as when the difference between right & left value is 32 or less, they use regular insertion sort. But if the difference avobe the level then they use Dual-Pivot Quicksort algorithm. diff --git a/Algorithm/miscellaneous/Factorial/README.md b/Algorithm/miscellaneous/Factorial/README.md index 271b020e..d9fb48cf 100644 --- a/Algorithm/miscellaneous/Factorial/README.md +++ b/Algorithm/miscellaneous/Factorial/README.md @@ -1,2 +1,2 @@ # Factorial -### Dynamic programming approch -> [Sazin's Git](https://github.com/SazinSamin/Samin_Reading_Room/tree/main/Algorithm/Dynamic%20Programming/Factorial) +### Dynamic programming approach -> [Sazin's Git](https://github.com/SazinSamin/Samin_Reading_Room/tree/main/Algorithm/Dynamic%20Programming/Factorial) diff --git a/Algorithm/miscellaneous/Fibonacci/README.md b/Algorithm/miscellaneous/Fibonacci/README.md index 5cdf014c..4e57b60a 100644 --- a/Algorithm/miscellaneous/Fibonacci/README.md +++ b/Algorithm/miscellaneous/Fibonacci/README.md @@ -1,4 +1,4 @@ # Fibonacci -Here we have regular solving approch. For optimization -### Got to [Dynamic Programming Approch](https://github.com/SazinSamin/Samin_Reading_Room/tree/main/Algorithm/Dynamic%20Programming/Fibonacci) +Here we have regular solving approach. For optimization +### Got to [Dynamic Programming Approach](https://github.com/SazinSamin/Samin_Reading_Room/tree/main/Algorithm/Dynamic%20Programming/Fibonacci) diff --git a/Algorithm/miscellaneous/IntegerOverflow/integerOverflowDetection.cpp b/Algorithm/miscellaneous/IntegerOverflow/integerOverflowDetection.cpp index a84a15d8..667d54ed 100644 --- a/Algorithm/miscellaneous/IntegerOverflow/integerOverflowDetection.cpp +++ b/Algorithm/miscellaneous/IntegerOverflow/integerOverflowDetection.cpp @@ -5,7 +5,7 @@ using namespace std; // this algorithm is not perfect for detecting integer overflow, -// it detect only when singed integer turrned into negetive but if signed integer again turn into positive +// it detect only when signed integer turrned into negetive but if signed integer again turn into positive // after rounding it's negetive portion, it's failed to detect the overflow. int isOverFlow(int* result, int a, int b){ diff --git a/Bug hunting/Floating point exception b/Bug hunting/Floating point exception index d5d8860c..2ccf0dbc 100644 --- a/Bug hunting/Floating point exception +++ b/Bug hunting/Floating point exception @@ -1,4 +1,4 @@ /* If you divide a number by 0 then, -C complier will generate "floating point exception". +C compiler will generate "floating point exception". Dart compiler gives us "infinity" diff --git a/Bug hunting/range_0.cpp b/Bug hunting/range_0.cpp index 363730d8..6074effe 100644 --- a/Bug hunting/range_0.cpp +++ b/Bug hunting/range_0.cpp @@ -12,13 +12,13 @@ leaving 2 bytes allocated but unused/* /*I have get a very strange problem here, line 17 foor loop, after finishing the process of for loop, the range variable value become -8 to 0, but the value store in different varibale. So I dig into the address arithmatic and find that when allocate memory for count array +8 to 0, but the value store in different variable. So I dig into the address arithmetic and find that when allocate memory for count array (line 11) exact less than the requirement, the line 19 for loop access to that address(where the range "range" variable value store), and set it as 0(as we here set count[i] = 0, we also set different value). Also this happened only when we pass a array from the main function. -If we don't pass the and array from the main function it doesn't happend. -Also one thing I observe it happend when we pass multipy of 4 like 0,4,8,12,16,20. +If we don't pass the and array from the main function it doesn't happened. +Also one thing I observe it happened when we pass multiply of 4 like 0,4,8,12,16,20. One thing may be */ diff --git a/C++/Basics/Casting/103_DynamicCasting.cpp b/C++/Basics/Casting/103_DynamicCasting.cpp index 5d7a6cfc..9286c1d4 100644 --- a/C++/Basics/Casting/103_DynamicCasting.cpp +++ b/C++/Basics/Casting/103_DynamicCasting.cpp @@ -1,12 +1,12 @@ /* - dynamic cast is actullay for casting from one class to another. + dynamic cast is actually for casting from one class to another. Base class to Child class = DownCasting Child class to Base class = UpCasting But if we manually do DownCasting, it would be Ok, because Child class already have information about Base class But UpCasting may cause problem, because a function which is unique to Child class may not have in Base class. Also a Child class instance, which type is "pointer to a Base" class, if we cast it to another Child of Base class then it might crash the problem as well, because in Casting time don't know what the actual type of that instance. - In dynamic_cast casting will not happend and return "null" in this case. + In dynamic_cast casting will not happened and return "null" in this case. https:www.youtube.com/watch?v=CiHfz6pTolQ&list=PLlrATfBNZ98dudnM48yfGUldqGD0S4FFb&index=74 https:www.geeksforgeeks.org/dynamic-_cast-in-cpp/ @@ -22,7 +22,7 @@ #include using namespace std; -// Polymorphic class, becase it has one virtual function. +// Polymorphic class, because it has one virtual function. class Base{ public: virtual void print(){ @@ -54,7 +54,7 @@ int main(){ if(c1){ c1->print(); }else{ - cout << "Cust didn't successfull" << endl; + cout << "Cust didn't successful" << endl; } } diff --git a/C++/Basics/Lamda.cpp b/C++/Basics/Lamda.cpp index 780eaa80..1f5d3bff 100644 --- a/C++/Basics/Lamda.cpp +++ b/C++/Basics/Lamda.cpp @@ -14,11 +14,11 @@ void printVector(vector v, void(*print)(int)){ int main(){ vector v = {1,2,3,4,5,6,7,8,9,10}; - // inline lamda function, which we can also put in a variable - // lamda function always start with [] which called "capture clause" + // inline lambda function, which we can also put in a variable + // lambda function always start with [] which called "capture clause" printVector(v, [](int val) { cout << val << endl; }); // the capture clause[] also take argument &(pass by ref), =(pass by val) , - // by which we can access to the outside argument in lamda function. + // by which we can access to the outside argument in lambda function. } diff --git a/C++/Basics/Templete(Generics).cpp b/C++/Basics/Templete(Generics).cpp index f1d7f908..43c47a9e 100644 --- a/C++/Basics/Templete(Generics).cpp +++ b/C++/Basics/Templete(Generics).cpp @@ -1,5 +1,5 @@ -// I found templete & Generics are same concept in C++ -// Generics implment using templete +// I found template & Generics are same concept in C++ +// Generics implement using template // https://www.geeksforgeeks.org/templates-cpp/ // https://www.geeksforgeeks.org/generics-in-c/ // https://www.youtube.com/watch?v=I-hZkUa9mIs&list=PLlrATfBNZ98dudnM48yfGUldqGD0S4FFb&index=53 @@ -12,8 +12,8 @@ using namespace std; // temeplete class -// define templete -// we can also take multiple arguments in templete +// define template +// we can also take multiple arguments in template template class Complex{ @@ -34,8 +34,8 @@ class Complex{ }; -// templete function -// define templete +// template function +// define template template T compare(T o1, T o2){ return (o1 > o2) ? o1 : o2; diff --git a/C++/Basics/Union.cpp b/C++/Basics/Union.cpp index 0760b110..e6f70be7 100644 --- a/C++/Basics/Union.cpp +++ b/C++/Basics/Union.cpp @@ -8,7 +8,7 @@ using namespace std; // union used for type punning or aliasing. The largest data member of the union is hold the only memory location. -// rest of the other member used that same location, this actullay for used for holding the same memory with +// rest of the other member used that same location, this actually for used for holding the same memory with // different types. union Complex{ int x; diff --git a/C++/Basics/const.cpp b/C++/Basics/const.cpp index 11cf79d7..afd8e338 100644 --- a/C++/Basics/const.cpp +++ b/C++/Basics/const.cpp @@ -5,7 +5,7 @@ using namespace std; int main(){ // const variable means it value can't be changed, - // also have intialize at decleartion time. + // also have initialize at decleartion time. const int a = 10; int b = 12; diff --git a/C++/Basics/enum.cpp b/C++/Basics/enum.cpp index d818948a..e319641f 100644 --- a/C++/Basics/enum.cpp +++ b/C++/Basics/enum.cpp @@ -5,7 +5,7 @@ using namespace std; // enum only take integer type -// defaule start from 0 +// default start from 0 // we can also define integer type // enum Gender:char{male, female}; diff --git a/C++/Basics/mutable.cpp b/C++/Basics/mutable.cpp index 8750144d..1e65a151 100644 --- a/C++/Basics/mutable.cpp +++ b/C++/Basics/mutable.cpp @@ -1,5 +1,5 @@ // as constant object can only call constant method of class -// so, to somwhow change any variable inside the const method, we can +// so, to somehow change any variable inside the const method, we can // marks that variable as mutable. #include @@ -19,7 +19,7 @@ class Player{ if(!weight){ weight = 60; } - cout << "heigh: " << height << " weight: " << weight << endl; + cout << "height: " << height << " weight: " << weight << endl; } }; diff --git a/C++/Basics/new.cpp b/C++/Basics/new.cpp index 70a104d6..2ffaebb2 100644 --- a/C++/Basics/new.cpp +++ b/C++/Basics/new.cpp @@ -1,5 +1,5 @@ // https : //www.youtube.com/watch?v=NUZdUSqsCs4&list=PLlrATfBNZ98dudnM48yfGUldqGD0S4FFb&index=39 -// "new" always allocate memmory in heap +// "new" always allocate memory in heap #include using namespace std; @@ -15,7 +15,7 @@ class Parent{ int main(){ // allocating single integer in the heap, single integer here is 4 bytes( depends on compiler). int* n = new int; - // allocating 50 block of interger type contiguous memory in the heap. ( 4 (interger size) * 50 = 200 bytes of memory) + // allocating 50 block of integer type contiguous memory in the heap. ( 4 (integer size) * 50 = 200 bytes of memory) int* array = new int[50]; // allocating size of Parent class memory in the heap diff --git a/C++/Basics/ranged_based_foorLoop.cpp b/C++/Basics/ranged_based_foorLoop.cpp index 36e1fbf2..c97d84df 100644 --- a/C++/Basics/ranged_based_foorLoop.cpp +++ b/C++/Basics/ranged_based_foorLoop.cpp @@ -12,13 +12,13 @@ int main(){ cout << var << endl; } - // we can decelar the array direcly inside the loop + // we can decelar the array directly inside the loop for(int x : vector{1, 3, 5, 7, 9}){ cout << x << endl; } int num[3] = {100, 200, 300}; - // normall iterator "int x" will copy the array value every times, so we can just + // normal iterator "int x" will copy the array value every times, so we can just // reference "int& x" the array values, also make the iterator const doesn't allow us to modify // the value. for(const int& x : num){ diff --git a/C++/Basics/smart_pointer.cpp b/C++/Basics/smart_pointer.cpp index 5c6b4ea8..1c0ce477 100644 --- a/C++/Basics/smart_pointer.cpp +++ b/C++/Basics/smart_pointer.cpp @@ -23,7 +23,7 @@ class Person{ }; int main(){ - // unique_ptr are hold unique_position. So, they cann't be copied, or store in another pointer, + // unique_ptr are hold unique_position. So, they can't be copied, or store in another pointer, // because if one pointer freed that location, another then hold that empty free position, // try to free again and crashed program unique_ptr u_ptr = make_unique("u_ptr", 24); diff --git a/C++/Basics/static_variable.cpp b/C++/Basics/static_variable.cpp index 7b3aecb2..2530d9e6 100644 --- a/C++/Basics/static_variable.cpp +++ b/C++/Basics/static_variable.cpp @@ -1,5 +1,5 @@ // https://www.geeksforgeeks.org/static-variables-in-c/ -// static variable also initialized 0 by compiler if not explicitly initilized by programmer. +// static variable also initialized 0 by compiler if not explicitly initialized by programmer. /* Static variable in C++, have life time scope, so it always retain position, not destroyed by any function call or wipe out the @@ -16,7 +16,7 @@ #include using namespace std; -// Global static variable, which visiable to all over the file. +// Global static variable, which visible to all over the file. static int a = 0; void incrementGlobal(){ @@ -24,7 +24,7 @@ void incrementGlobal(){ } int incrementLocal(){ - // Local static variable, which visiable to only this function. + // Local static variable, which visible to only this function. static int b = 0; return ++b; } diff --git a/C++/Basics/ternary_operator.cpp b/C++/Basics/ternary_operator.cpp index 3116f260..276a0bcc 100644 --- a/C++/Basics/ternary_operator.cpp +++ b/C++/Basics/ternary_operator.cpp @@ -1,8 +1,8 @@ // the ternary operator is alternative of if else condition, also it has some performance benefit // if we wrote this code as like, -// in here we actully creating an empty string object, then we override the object inside the if else block with new one, -// so it's technically slow, beacuse we first creating an empty string, then destroying it and again override this. +// in here we actually creating an empty string object, then we override the object inside the if else block with new one, +// so it's technically slow, because we first creating an empty string, then destroying it and again override this. // but, in this case ternary value can do some return value optimization. // also ternary operator looks cleaner. diff --git a/C++/Container/0002_Vector/0002_reserve.cpp b/C++/Container/0002_Vector/0002_reserve.cpp index 02930073..71ab4c7f 100644 --- a/C++/Container/0002_Vector/0002_reserve.cpp +++ b/C++/Container/0002_Vector/0002_reserve.cpp @@ -4,7 +4,7 @@ // but we can allocate space in first position like array. // so the requested space will allocated for the vector. // no dynamic allocation will happened before the space has consumed. -// increase performace. +// increase performance. #include #include diff --git a/C++/Object Oriented Programming/1112. Constructor.cpp b/C++/Object Oriented Programming/1112. Constructor.cpp index 509c6bdf..b1b708c0 100644 --- a/C++/Object Oriented Programming/1112. Constructor.cpp +++ b/C++/Object Oriented Programming/1112. Constructor.cpp @@ -25,7 +25,7 @@ class Player{ }; -//constructor defintion +//constructor definition Player::Player(int x, int y){ X = x; Y = y; diff --git a/C++/Object Oriented Programming/1114. Static.cpp b/C++/Object Oriented Programming/1114. Static.cpp index ec4e2165..bca378a3 100644 --- a/C++/Object Oriented Programming/1114. Static.cpp +++ b/C++/Object Oriented Programming/1114. Static.cpp @@ -26,10 +26,10 @@ class Player{ static int y; - // also in class intialization of a static variable always be const, because the value should be always same + // also in class initialization of a static variable always be const, because the value should be always same // there will be only one copy of the value for that class // compiler also can do some optimization in this case. - // ***need more clear explaination + // ***need more clear explanation const static int st_cnt_x = 10; // static public method. diff --git a/C++/Object Oriented Programming/1116. Inheritance(access_mode).cpp b/C++/Object Oriented Programming/1116. Inheritance(access_mode).cpp index afb34b06..01550e3a 100644 --- a/C++/Object Oriented Programming/1116. Inheritance(access_mode).cpp +++ b/C++/Object Oriented Programming/1116. Inheritance(access_mode).cpp @@ -5,14 +5,14 @@ using namespace std; class Animal{ - // private data & method are only avaiable to this class. + // private data & method are only available to this class. private: int weight; void AnimalWeight(){ cout << "Weight approximately: " << weight << endl; } - // protected member avaiable in this class & it's sub class. + // protected member available in this class & it's sub class. protected: string name; string eyeColor; @@ -21,7 +21,7 @@ class Animal{ cout << "EyeColor: " << eyeColor << endl; } - // avaiable to all + // available to all public: int speed; @@ -32,11 +32,11 @@ class Animal{ // public: public // protected: protected -// private: can not accessable +// private: can not accessible class Dog : public Animal{ public: void Color(string color){ - // as eyeColor is protected so can be accessable from sub class. + // as eyeColor is protected so can be accessible from sub class. eyeColor = color; eye(); } @@ -44,7 +44,7 @@ class Dog : public Animal{ // public: protected // protected: protected -// private: can not accessable +// private: can not accessible class Shepard : protected Animal{ public: void Name(string getName){ @@ -55,7 +55,7 @@ class Shepard : protected Animal{ // public: private // protected: private -// private: can not accessable +// private: can not accessible class GroupLeader: private Animal{ } @@ -64,7 +64,7 @@ int main(){ Dog d; // speed variable & AnimalSpeed method both are public in super class, - // so, accessable from anywhere. + // so, accessible from anywhere. d.speed = 30; d.AnimalSpeed(); d.Color("Blue"); diff --git a/C++/Object Oriented Programming/1116B. Inheritance(type).cpp b/C++/Object Oriented Programming/1116B. Inheritance(type).cpp index dacdcb54..8189af02 100644 --- a/C++/Object Oriented Programming/1116B. Inheritance(type).cpp +++ b/C++/Object Oriented Programming/1116B. Inheritance(type).cpp @@ -17,7 +17,7 @@ class GameResult : public Player{ } -// multiple inhertance +// multiple inheritance class Detail : public Game, public Player{ } diff --git a/C++/Object Oriented Programming/1117. Vitual_Function.cpp b/C++/Object Oriented Programming/1117. Vitual_Function.cpp index a2a7d8e4..96564e05 100644 --- a/C++/Object Oriented Programming/1117. Vitual_Function.cpp +++ b/C++/Object Oriented Programming/1117. Vitual_Function.cpp @@ -34,15 +34,15 @@ class ChildClass : public BaseClass{ int main(){ - // Suppose we have a function overriden in Child class, means that function in both Base class & Child class. + // Suppose we have a function overridden in Child class, means that function in both Base class & Child class. // Now, when we instanace a object using Child class and that object type is on Base class, then the compiler will - // called the Base class function, as it doesn't have idea about the Child class overriden function. + // called the Base class function, as it doesn't have idea about the Child class overridden function. BaseClass* c = new ChildClass(12); // So to avoid this situation, C++ use "virtual" function, when a function of a class mark as virtual CPP create and - // maintain a V-Table, which have the information about the overriden function of Base class in Child classes. - // Now, the compiler know about the all overriden function and act correctly. The procedure same for virtual destructor. + // maintain a V-Table, which have the information about the overridden function of Base class in Child classes. + // Now, the compiler know about the all overridden function and act correctly. The procedure same for virtual destructor. c->print(); } diff --git a/C++/Object Oriented Programming/1118. Interface(pure_virual_function).cpp b/C++/Object Oriented Programming/1118. Interface(pure_virual_function).cpp index 0fb87452..10b4ad13 100644 --- a/C++/Object Oriented Programming/1118. Interface(pure_virual_function).cpp +++ b/C++/Object Oriented Programming/1118. Interface(pure_virual_function).cpp @@ -14,7 +14,7 @@ class Base{ virtual void ShowName() = 0; }; -// Subclass have to give implementation of abstruct class unimplemeted mathod +// Subclass have to give implementation of abstruct class unimplemeted method // nor it will also be a abstruct class. class Child : public Base{ public: diff --git a/C++/Object Oriented Programming/1120. Member Initializer.cpp b/C++/Object Oriented Programming/1120. Member Initializer.cpp index 2aab63ca..66fcbd90 100644 --- a/C++/Object Oriented Programming/1120. Member Initializer.cpp +++ b/C++/Object Oriented Programming/1120. Member Initializer.cpp @@ -1,5 +1,5 @@ -// To initilize the member variable or object of the Class member, -// we use member initializer list, this gives performance benefit over normal assignement of member variable inside +// To initialize the member variable or object of the Class member, +// we use member initializer list, this gives performance benefit over normal assignment of member variable inside // the constructor. // These links also give clear explaintion, with where we must use this initializer list @@ -11,7 +11,7 @@ // when we initialize class variable in constructor, we should always maintain the initialization order // with the declearation order of class variable, -// like here in Parent class we have two class variabel x, y, so we first should initialize x, then y. +// like here in Parent class we have two class variable x, y, so we first should initialize x, then y. #include diff --git a/C++/Object Oriented Programming/1122. Explicit_constructor.cpp b/C++/Object Oriented Programming/1122. Explicit_constructor.cpp index 3d05a376..30566994 100644 --- a/C++/Object Oriented Programming/1122. Explicit_constructor.cpp +++ b/C++/Object Oriented Programming/1122. Explicit_constructor.cpp @@ -23,9 +23,9 @@ int main(){ Player p1(20); // but we can instantiate object below like this, - // what it actullay do the implitcit conversion, it take integer 20, and take it as parameter of Player class + // what it actually do the implitcit conversion, it take integer 20, and take it as parameter of Player class // constructor by implicitly converting to Player class variable type. - // remeber we can do it for only single constructor parameter. + // remember we can do it for only single constructor parameter. Player p2 = 20; // and so we can't do it, when we marks a constructor as explitcit, diff --git a/C++/Object Oriented Programming/1122A_Method_Overloading.cpp b/C++/Object Oriented Programming/1122A_Method_Overloading.cpp index 4c706a97..0cbab0dc 100644 --- a/C++/Object Oriented Programming/1122A_Method_Overloading.cpp +++ b/C++/Object Oriented Programming/1122A_Method_Overloading.cpp @@ -14,7 +14,7 @@ class Person { } void display() { - cout << "Same name No paramter" << endl; + cout << "Same name No parameter" << endl; } void display(int param) { cout << "Same name One parameter " << endl; diff --git a/C++/Object Oriented Programming/1123. Operator_Overloading.cpp b/C++/Object Oriented Programming/1123. Operator_Overloading.cpp index 7047b488..0284f2b0 100644 --- a/C++/Object Oriented Programming/1123. Operator_Overloading.cpp +++ b/C++/Object Oriented Programming/1123. Operator_Overloading.cpp @@ -16,7 +16,7 @@ class Complex{ return Complex( real + other.real, imag + other.imag); } - // by overload the == opeartor, we can compare two class. + // by overload the == operator, we can compare two class. bool operator == (Complex other){ return (real == other.real && imag == other.imag); } diff --git a/C++/Object Oriented Programming/1124. this.cpp b/C++/Object Oriented Programming/1124. this.cpp index 72d18edb..251ae9b7 100644 --- a/C++/Object Oriented Programming/1124. this.cpp +++ b/C++/Object Oriented Programming/1124. this.cpp @@ -3,7 +3,7 @@ // https://www.geeksforgeeks.org/g-fact-77/ -// "this" actually a pointer to that class, it is only avaiable inside the class, +// "this" actually a pointer to that class, it is only available inside the class, // by using "this" we can access to class variable & methods inside the class. #include diff --git a/C++/Object Oriented Programming/1125. Copy_constructor.cpp b/C++/Object Oriented Programming/1125. Copy_constructor.cpp index e9e0f76c..b186f919 100644 --- a/C++/Object Oriented Programming/1125. Copy_constructor.cpp +++ b/C++/Object Oriented Programming/1125. Copy_constructor.cpp @@ -1,10 +1,10 @@ // https://www.youtube.com/watch?v=BvR1Pgzzr38&list=PLlrATfBNZ98dudnM48yfGUldqGD0S4FFb&index=45 // https://www.geeksforgeeks.org/copy-constructor-in-cpp/ -// when we want instantiate a object with the data of other object of same class, then we need copy construtor... -// C++ gives us a defaul copy construcot, but that constructor does shallow copy, means just that class member variable +// when we want instantiate a object with the data of other object of same class, then we need copy constructor... +// C++ gives us a default copy construcot, but that constructor does shallow copy, means just that class member variable // address, instead of allocate new memory for new object. -// C++ defualt copy constructor does well for normal class member, but become probmatic for heap allocating memory, +// C++ default copy constructor does well for normal class member, but become probmatic for heap allocating memory, // as two then Object pointing to the same memory location. // For how to deal with copy constructor when we have heap allocated class member, go to below link-> // https://github.com/SazinSamin/Samin_Reading_Room/blob/main/C%2B%2B/VoltStar/copy_constructor_for_heap_allocate_memory.cpp diff --git a/C++/Object Oriented Programming/1126. Virtual_destructor.cpp b/C++/Object Oriented Programming/1126. Virtual_destructor.cpp index c0897b0b..f246094d 100644 --- a/C++/Object Oriented Programming/1126. Virtual_destructor.cpp +++ b/C++/Object Oriented Programming/1126. Virtual_destructor.cpp @@ -11,7 +11,7 @@ using namespace std; class Base{ public: Base(){ cout << "Base constructor called" << endl; } - // mark base class destructor as as virtual to call all it's subclass desctructor. + // mark base class destructor as as virtual to call all it's subclass destructor. virtual ~Base() { cout << "Base destructor called" << endl; } }; diff --git a/C++/Object Oriented Programming/code_example/inheritance_multipleArguments_&_parentConstructor.cpp b/C++/Object Oriented Programming/code_example/inheritance_multipleArguments_&_parentConstructor.cpp index 1a64362e..bcd09923 100644 --- a/C++/Object Oriented Programming/code_example/inheritance_multipleArguments_&_parentConstructor.cpp +++ b/C++/Object Oriented Programming/code_example/inheritance_multipleArguments_&_parentConstructor.cpp @@ -1,4 +1,4 @@ -// realted solved problem: https://github.com/SazinSamin/Problem-Solving/blob/main/HackerRank/30%20days%20of%20code/Day%2012:%20Inheritance.cpp +// related solved problem: https://github.com/SazinSamin/Problem-Solving/blob/main/HackerRank/30%20days%20of%20code/Day%2012:%20Inheritance.cpp #include using namespace std; diff --git a/C++/Pointer/smart_pointer.cpp b/C++/Pointer/smart_pointer.cpp index 5c6b4ea8..1c0ce477 100644 --- a/C++/Pointer/smart_pointer.cpp +++ b/C++/Pointer/smart_pointer.cpp @@ -23,7 +23,7 @@ class Person{ }; int main(){ - // unique_ptr are hold unique_position. So, they cann't be copied, or store in another pointer, + // unique_ptr are hold unique_position. So, they can't be copied, or store in another pointer, // because if one pointer freed that location, another then hold that empty free position, // try to free again and crashed program unique_ptr u_ptr = make_unique("u_ptr", 24); diff --git a/C++/Pointer/string_pointer_traverse.cpp b/C++/Pointer/string_pointer_traverse.cpp index 66efb7c4..996bc21a 100644 --- a/C++/Pointer/string_pointer_traverse.cpp +++ b/C++/Pointer/string_pointer_traverse.cpp @@ -6,7 +6,7 @@ using namespace std; // the array decays to pointer, means instead of copying the whole array & it's element, // it just copy the it's first address of the array. // which is a pointer. -// so, we decode that pointer, and can do pointer arithmatic to traverse tha char array here. +// so, we decode that pointer, and can do pointer arithmetic to traverse than char array here. // see Denis Riche book for that. diff --git a/C++/Problems/Object_instantiation_type.cpp b/C++/Problems/Object_instantiation_type.cpp index c47252bd..9d38c2b4 100644 --- a/C++/Problems/Object_instantiation_type.cpp +++ b/C++/Problems/Object_instantiation_type.cpp @@ -1,6 +1,6 @@ -// if you don't familiar with how to intialize class variable in c++, see this below link: +// if you don't familiar with how to initialize class variable in c++, see this below link: // https://github.com/SazinSamin/Samin_Reading_Room/blob/main/C%2B%2B/Object%20Oriented%20Programming/1120.%20Member%20Initializer.cpp -// I don't get exact clear explaination of class object instantiation different type in inside main function +// I don't get exact clear explanation of class object instantiation different type in inside main function // like: p11 and p12, or p21 and p22. // some exaplaition found in stackoverflow @@ -16,7 +16,7 @@ class Parent{ int y; public: - // default construtor + // default constructor Parent() : x(10), y(20){} // parameterised constructor diff --git a/C++/Problems/operator overload & implitcit conversion.cpp b/C++/Problems/operator overload & implitcit conversion.cpp index 71d88f89..7e0a7b95 100644 --- a/C++/Problems/operator overload & implitcit conversion.cpp +++ b/C++/Problems/operator overload & implitcit conversion.cpp @@ -15,7 +15,7 @@ class Fraction int main() { Fraction f(2, 5); - float val = f; // can't able to understand without calling Fraction class Overloded function float() method how this - cout << val; // convert, look like implicit conversion, search for explaination. + float val = f; // can't able to understand without calling Fraction class Overloaded function float() method how this + cout << val; // convert, look like implicit conversion, search for explanation. return 0; } diff --git a/C++/STL/1112_Vector.cpp b/C++/STL/1112_Vector.cpp index 89bae8a1..d8efc733 100644 --- a/C++/STL/1112_Vector.cpp +++ b/C++/STL/1112_Vector.cpp @@ -3,9 +3,9 @@ using namespace std; // when we pass vector in a function, we should pass it as a reference, because unlike array which, when pass the array -// to a function, that array decays to pointer, but the vector here actullay copy the whole elements of the array,when +// to a function, that array decays to pointer, but the vector here actually copy the whole elements of the array,when // we pass that to a function. -// which have performance drawback, beacuse copying whole elements take a lot of time. +// which have performance drawback, because copying whole elements take a lot of time. // video link -> https://www.youtube.com/watch?v=PocJ5jXv8No&list=PLlrATfBNZ98dudnM48yfGUldqGD0S4FFb&index=48 // facts about vector -> https://github.com/SazinSamin/Samin_Reading_Room/blob/main/C%2B%2B/Style/vector_construct_vs_push_back.cpp diff --git a/C++/Style/return_multiple_values.cpp b/C++/Style/return_multiple_values.cpp index 8d12813a..ad5e2b26 100644 --- a/C++/Style/return_multiple_values.cpp +++ b/C++/Style/return_multiple_values.cpp @@ -11,7 +11,7 @@ void increment_by_ref(int& a, int &b){ b++; } -// get addreess the of that variable by pointer & directly write to that. +// get address the of that variable by pointer & directly write to that. void increment_by_ptr(int* a, int *b){ (*a)++; (*b)++; @@ -32,7 +32,7 @@ vector increment_by_vector(int a, int b){ } -// make a strcuture with joining the different types of data, and return that struct, +// make a structure with joining the different types of data, and return that struct, // we can also do this by make a class. struct Node{ int a; diff --git a/C++/Style/stack_based_heap_allocation.cpp b/C++/Style/stack_based_heap_allocation.cpp index 374c4a37..0defc702 100644 --- a/C++/Style/stack_based_heap_allocation.cpp +++ b/C++/Style/stack_based_heap_allocation.cpp @@ -1,7 +1,7 @@ // https://www.youtube.com/watch?v=iNuTwvD6ciI&list=PLlrATfBNZ98dudnM48yfGUldqGD0S4FFb&index=43 // stack based automatic heap allocation. -// as allocating memmory in the heap, we have to free that memory explicitly. +// as allocating memory in the heap, we have to free that memory explicitly. // we can automate this things by stack based heap allocation. #include diff --git a/C++/Style/use_1DArray_instead_of_2DArray.cpp b/C++/Style/use_1DArray_instead_of_2DArray.cpp index bdd5b5e5..4a62430e 100644 --- a/C++/Style/use_1DArray_instead_of_2DArray.cpp +++ b/C++/Style/use_1DArray_instead_of_2DArray.cpp @@ -1,5 +1,5 @@ -// instead of declearing a two dimentional array, we can also do the same thing with one dimentional array. -// beacuse in one dimentional array the memory are contiguous, so they have faster access. +// instead of declearing a two dimensional array, we can also do the same thing with one dimensional array. +// because in one dimensional array the memory are contiguous, so they have faster access. // See this video last portion -> https://www.youtube.com/watch?v=gNgUMA_Ur0U&list=PLlrATfBNZ98dudnM48yfGUldqGD0S4FFb&index=64 #include @@ -11,7 +11,7 @@ int main(){ int n = 5; int count = 0; - // we have declear a two dimentional array, and put some value to that array in traditional way. + // we have declear a two dimensional array, and put some value to that array in traditional way. int array[n][n]; for(int i=0; i diff --git a/C++/c_string+=.cpp b/C++/c_string+=.cpp index 513c091f..3397c127 100644 --- a/C++/c_string+=.cpp +++ b/C++/c_string+=.cpp @@ -1,4 +1,4 @@ -//C++ string work like other varibale +//C++ string work like other variable // #include diff --git a/C/C problems/array_address_doesn't_change.cpp b/C/C problems/array_address_doesn't_change.cpp index 698148fc..b6c19b07 100644 --- a/C/C problems/array_address_doesn't_change.cpp +++ b/C/C problems/array_address_doesn't_change.cpp @@ -6,14 +6,14 @@ So I want to assign my newly allocated array "new_arr" to the old "array". The assignment of address of "new_arr" is successfully assign to the "array", -But the change we can see in just in the funciton, +But the change we can see in just in the function, Not in the global scope. But we know that pointer hold the address of that variable. So if we make any change to that, then the change reflected globally. -But in this case that's doesn't happend. -The address of "array" remain same in main funciton. +But in this case that's doesn't happened. +The address of "array" remain same in main function. diff --git a/C/README.md b/C/README.md index 7394b489..2229bf4e 100644 --- a/C/README.md +++ b/C/README.md @@ -2,6 +2,6 @@ #### Source: .c #### Preprocess: .c #### Compile: .s (assembly code) - #### assembler: .o (Objec code) + #### assembler: .o (Object code) #### linker: .out (executable binray) diff --git a/C/Tik Tok Toe.c b/C/Tik Tok Toe.c index ed936836..d843595e 100644 --- a/C/Tik Tok Toe.c +++ b/C/Tik Tok Toe.c @@ -39,7 +39,7 @@ int main(){ //Increment i until hit 9, as out matrix is 3x3. i += 1; - //Player 1 input proccess + //Player 1 input process printf("\nPlayer X: "); scanf("%d", &player1); player1 = MapKeyBoardInput(player1); @@ -174,7 +174,7 @@ void Display(int array[]){ } -//This function map game input to corresponding real postion +//This function map game input to corresponding real position // 7 8 9 0 1 2 1 2 3 // 4 5 6 ------> 3 4 5 ------> 4 5 6 diff --git a/C/minprintf.c b/C/minprintf.c index d373881f..29e3b3af 100644 --- a/C/minprintf.c +++ b/C/minprintf.c @@ -1,6 +1,6 @@ -//This is implementaion of printf funciton +//This is implementation of printf function //from Denis Ritche book -//before procced see this vedio, +//before procced see this video, //https://www.youtube.com/watch?v=WfMWE7EAGyc diff --git a/Dart/Advance/Arithmatic_operation_on_Generics.dart b/Dart/Advance/Arithmatic_operation_on_Generics.dart index 1454796d..fc3b061b 100644 --- a/Dart/Advance/Arithmatic_operation_on_Generics.dart +++ b/Dart/Advance/Arithmatic_operation_on_Generics.dart @@ -1,4 +1,4 @@ -// You can't do arithmatic operation on Generics type +// You can't do arithmetic operation on Generics type // we have extend it either with num class or use interface. // stackoverflow: diff --git a/Dart/Advance/OperatorOverloading_using_Generics.dart b/Dart/Advance/OperatorOverloading_using_Generics.dart index 63114996..3c33da33 100644 --- a/Dart/Advance/OperatorOverloading_using_Generics.dart +++ b/Dart/Advance/OperatorOverloading_using_Generics.dart @@ -1,4 +1,4 @@ -// see this link to know, how to do arithmatic operation in Generics variables +// see this link to know, how to do arithmetic operation in Generics variables // https://github.com/SazinSamin/Samin_Reading_Room/blob/main/Dart/Advance/Arithmatic_operation_on_Generics.dart class Complex{ diff --git a/Dart/Functionality/Immediately_Invoked_Function_Expression.dart b/Dart/Functionality/Immediately_Invoked_Function_Expression.dart index 9e954b3f..f9b240ff 100644 --- a/Dart/Functionality/Immediately_Invoked_Function_Expression.dart +++ b/Dart/Functionality/Immediately_Invoked_Function_Expression.dart @@ -1,4 +1,4 @@ -// The Immediately_Invoked_Function_Expression avaible on Javascript, I also found this stuff also work in Dart. +// The Immediately_Invoked_Function_Expression available on Javascript, I also found this stuff also work in Dart. // https://github.com/SazinSamin/Samin_Reading_Room/blob/main/Javascript/Raw/10_Function/114_IIFE.js diff --git a/Dart/Object_Orieneted_Programming/0002_ClassMethod_Vs_InstanceMethod.dart b/Dart/Object_Orieneted_Programming/0002_ClassMethod_Vs_InstanceMethod.dart index e17f7aa5..241675dd 100644 --- a/Dart/Object_Orieneted_Programming/0002_ClassMethod_Vs_InstanceMethod.dart +++ b/Dart/Object_Orieneted_Programming/0002_ClassMethod_Vs_InstanceMethod.dart @@ -8,7 +8,7 @@ class Person { // class variable or member, directly can call with the name of class static String? about; - // instance methods, can only acess instance variable & only avaiable with + // instance methods, can only access instance variable & only available with // Class Instance. void display() { print('$name, $age'); @@ -38,7 +38,7 @@ void main() { } -// I have to add some info also to this files, because instance member can acess static variables and methods. +// I have to add some info also to this files, because instance member can access static variables and methods. // Instance method vs Static method diff --git a/Dart/Object_Orieneted_Programming/0004_super.dart b/Dart/Object_Orieneted_Programming/0004_super.dart index d6e725d2..84ea34e4 100644 --- a/Dart/Object_Orieneted_Programming/0004_super.dart +++ b/Dart/Object_Orieneted_Programming/0004_super.dart @@ -25,7 +25,7 @@ class Student extends Person { @override void display() { - // "super" keywork is used to access the super class method from sub class. + // "super" keyword is used to access the super class method from sub class. super.display(); print('$_name, $_age'); diff --git a/Dart/Problems.dart/arithmatic_operator_Generic.dart b/Dart/Problems.dart/arithmatic_operator_Generic.dart index 835a3441..700e93fa 100644 --- a/Dart/Problems.dart/arithmatic_operator_Generic.dart +++ b/Dart/Problems.dart/arithmatic_operator_Generic.dart @@ -1,4 +1,4 @@ -// arithmatic operator doesn't work for Generic +// arithmetic operator doesn't work for Generic // solution: https://github.com/SazinSamin/Samin_Reading_Room/blob/main/Dart/Info/arithmatic_operator_Generic.dart diff --git a/Data Structure/Binary Heap/README.md b/Data Structure/Binary Heap/README.md index 66233348..33fabc97 100644 --- a/Data Structure/Binary Heap/README.md +++ b/Data Structure/Binary Heap/README.md @@ -1,2 +1,2 @@ [Binary Heap](https://www.geeksforgeeks.org/binary-heap/) -Also see coursera data strucutre course. +Also see coursera data structure course. diff --git a/Data Structure/Graph/README.md b/Data Structure/Graph/README.md index a060cf50..e50d4ea4 100644 --- a/Data Structure/Graph/README.md +++ b/Data Structure/Graph/README.md @@ -1,5 +1,5 @@ Depth first search also called Level-Order-Traversal, but the word DSF mainly used for graph as graph may have cycle, so if we visit a -node once, we don't visit that node again. If we visit that node again, then we can fall on infinte loop in graph. +node once, we don't visit that node again. If we visit that node again, then we can fall on infinite loop in graph. So, DFS & BFS word mainly used for Graph. In tree the DFS also we can called as Level-Order-Traversal. diff --git a/Data Structure/Graph/Traversal/BFS/BFS(array).cpp b/Data Structure/Graph/Traversal/BFS/BFS(array).cpp index acdc9649..042966e3 100644 --- a/Data Structure/Graph/Traversal/BFS/BFS(array).cpp +++ b/Data Structure/Graph/Traversal/BFS/BFS(array).cpp @@ -1,6 +1,6 @@ // https://www.youtube.com/watch?v=ZR9f2YIFHD0&list=PLlOmh-YAEmsA3TaCvAAQjXrgeZKWxEuak&index=10 // Define all array as global variable, we can define them as local variable & pass them to the function. -// That will allow us to take variabel amount of value. +// That will allow us to take variable amount of value. #include #include diff --git a/Data Structure/Graph/Traversal/DFS/depth_first_search.cpp b/Data Structure/Graph/Traversal/DFS/depth_first_search.cpp index 3c017705..57f7107a 100644 --- a/Data Structure/Graph/Traversal/DFS/depth_first_search.cpp +++ b/Data Structure/Graph/Traversal/DFS/depth_first_search.cpp @@ -1,6 +1,6 @@ //https://www.youtube.com/watch?v=kMS5Fxjrd6E&list=PLlOmh-YAEmsA3TaCvAAQjXrgeZKWxEuak&index=6 //I use vector & visited array as local variable to manipulate as much as data you want....... -//Be carefull about put the source number in dfs function from main function. +//Be careful about put the source number in dfs function from main function. //Put the node number when to start traversing. If you put a number which doesn't exit //then it wouldn't traverse the list. #include diff --git a/Data Structure/Graph/Traversal/Dijkstra/dijkstra.cpp b/Data Structure/Graph/Traversal/Dijkstra/dijkstra.cpp index 8f6949b4..f26b8594 100644 --- a/Data Structure/Graph/Traversal/Dijkstra/dijkstra.cpp +++ b/Data Structure/Graph/Traversal/Dijkstra/dijkstra.cpp @@ -80,7 +80,7 @@ int main(){ graph[n1].push_back({n2, w}); } - // as we add node+1, so here we minus that, letter write more desciption. + // as we add node+1, so here we minus that, letter write more description. //printNode(graph, nodes - 1); int source = 3; diff --git a/Data Structure/Hashing/README.md b/Data Structure/Hashing/README.md index 3ecc8b7b..f8606121 100644 --- a/Data Structure/Hashing/README.md +++ b/Data Structure/Hashing/README.md @@ -1,7 +1,7 @@ -#### MD5 hash in teminal +#### MD5 hash in terminal - md5sum <<<"Your text" -#### Hashing also very important for distributed caching service which like consistant hashing +#### Hashing also very important for distributed caching service which like consistent hashing - https://www.shafaetsplanet.com/?p=3831 - https://www.youtube.com/watch?v=iuqZvajTOyA diff --git a/Data Structure/Linked List/Cycle_Detection/README.md b/Data Structure/Linked List/Cycle_Detection/README.md index 66317cd5..4c503683 100644 --- a/Data Structure/Linked List/Cycle_Detection/README.md +++ b/Data Structure/Linked List/Cycle_Detection/README.md @@ -1,10 +1,10 @@ ## Floyed cycle detection algorithm.... - In case of measuring the loop length we can use this algorithm. - - uVa 350 sudo random number generation problem solve with this algorthm. where in this problem we have find out when the generated number will repeat again because in computer generated random number is bounded by modulus + - uVa 350 sudo random number generation problem solve with this algorithm. where in this problem we have find out when the generated number will repeat again because in computer generated random number is bounded by modulus - You can understand the problem if you see the problem -> https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=286 - - One thing I observe when solve this problem, as we know the speed of fast pointer is twice than the slow pointer, so if there is loop then when the slow pointer reaches at the end of list then fast pointer also reaches to that position by it 2nd iteration. As there is loop or the number reapeated after a time, so when fast pointer 1st time reaches at the end of loop, then it's again get the number in where it start it's journey, which will ignite fast pointer 2nd iteration. + - One thing I observe when solve this problem, as we know the speed of fast pointer is twice than the slow pointer, so if there is loop then when the slow pointer reaches at the end of list then fast pointer also reaches to that position by it 2nd iteration. As there is loop or the number repeated after a time, so when fast pointer 1st time reaches at the end of loop, then it's again get the number in where it start it's journey, which will ignite fast pointer 2nd iteration. Another thing when the fast pointer reaches at the end then the slow pointer will be in the middle of the list because you know fast pointer has twice speed than the slow pointer. After then fast pointer reaches end of the list, as list has loop or reapeted number it will start it 2nd iteration, on the other hand slow pointer start it's journey to the second half. And as fast pointer has speed twice of slow, it will be at the end of the list when the slow pointer also in the end of list. And both pointer value will match. diff --git a/Data Structure/Linked List/Cycle_Detection/cycle_detection(floyed algorithm)(Two pointer approch).cpp b/Data Structure/Linked List/Cycle_Detection/cycle_detection(floyed algorithm)(Two pointer approch).cpp index 5575f28c..17e35cef 100644 --- a/Data Structure/Linked List/Cycle_Detection/cycle_detection(floyed algorithm)(Two pointer approch).cpp +++ b/Data Structure/Linked List/Cycle_Detection/cycle_detection(floyed algorithm)(Two pointer approch).cpp @@ -100,7 +100,7 @@ int main(){ insert(i); } - //Be carefull to pass data in makeCycle + //Be careful to pass data in makeCycle //For reduce complexity we don't add //any bound checking to it. makeCycle(6); diff --git a/Data Structure/Linked List/Cycle_Detection/cycle_detection_using vector.cpp b/Data Structure/Linked List/Cycle_Detection/cycle_detection_using vector.cpp index 085005f4..d69add9c 100644 --- a/Data Structure/Linked List/Cycle_Detection/cycle_detection_using vector.cpp +++ b/Data Structure/Linked List/Cycle_Detection/cycle_detection_using vector.cpp @@ -55,7 +55,7 @@ void makeCycle(){ //Declear global variable vector -//for persistance data +//for persistence data vector v; int saveData(int data){ //Traverse the vector and see if the data already present or not. diff --git a/Data Structure/Linked List/Cycle_Detection/cycle_detection_using_flag.cpp b/Data Structure/Linked List/Cycle_Detection/cycle_detection_using_flag.cpp index 7a727449..dd8b6d67 100644 --- a/Data Structure/Linked List/Cycle_Detection/cycle_detection_using_flag.cpp +++ b/Data Structure/Linked List/Cycle_Detection/cycle_detection_using_flag.cpp @@ -78,7 +78,7 @@ int main(){ insert(i); } - //Be carefull to pass data in makeCycle + //Be careful to pass data in makeCycle //For reduce complexity we don't add //any bound checking to it. makeCycle(6); diff --git a/Data Structure/Linked List/Cycle_Detection/cycle_detection_using_without_modifying_data_structure.cpp b/Data Structure/Linked List/Cycle_Detection/cycle_detection_using_without_modifying_data_structure.cpp index ddeb36ff..00403bc3 100644 --- a/Data Structure/Linked List/Cycle_Detection/cycle_detection_using_without_modifying_data_structure.cpp +++ b/Data Structure/Linked List/Cycle_Detection/cycle_detection_using_without_modifying_data_structure.cpp @@ -54,7 +54,7 @@ void makeCycle(){ //to traverse the loop, we point the head node to the nx node. //see the code, you can understand -//We here actully traverse the loop and make every node next pointer pointing to the same temp node +//We here actually traverse the loop and make every node next pointer pointing to the same temp node //So, if a node already pointing to the temp node, that means we visited that node before //and there is a loop. diff --git a/Data Structure/Linked List/Linked_list_Sorting/README.md b/Data Structure/Linked List/Linked_list_Sorting/README.md index b279cdf1..7663fd07 100644 --- a/Data Structure/Linked List/Linked_list_Sorting/README.md +++ b/Data Structure/Linked List/Linked_list_Sorting/README.md @@ -1,5 +1,5 @@ We in this Linked_list_Merge_Sort.cpp programe sent the head node by reference by pointer to pointer. -Is there any way to achive the result by just send the head node pointer. +Is there any way to achieve the result by just send the head node pointer. When I try to do that it gives the half sorted array. I don't get any solution yet. diff --git a/Data Structure/Linked List/insertion/linked_list_insertion(passing as a local variable).cpp b/Data Structure/Linked List/insertion/linked_list_insertion(passing as a local variable).cpp index 0c77cf30..9ab9314c 100644 --- a/Data Structure/Linked List/insertion/linked_list_insertion(passing as a local variable).cpp +++ b/Data Structure/Linked List/insertion/linked_list_insertion(passing as a local variable).cpp @@ -1,4 +1,4 @@ -//Node pass to funtion from the main function & return from there. +//Node pass to function from the main function & return from there. #include using namespace std; diff --git a/Data Structure/Linked List/linked_list.cpp b/Data Structure/Linked List/linked_list.cpp index ed7dbd9f..98384859 100644 --- a/Data Structure/Linked List/linked_list.cpp +++ b/Data Structure/Linked List/linked_list.cpp @@ -14,7 +14,7 @@ struct Node* head; //Get new node and set data. struct Node* getNode(int data){ - //Dynamic memory allocation fron heap. + //Dynamic memory allocation from heap. struct Node* temp = (struct Node*) malloc(sizeof(struct Node)); temp->data = data; temp->right = NULL; diff --git a/Data Structure/Tree/AVL tree/README.md b/Data Structure/Tree/AVL tree/README.md index 5e785b27..5d5be3d7 100644 --- a/Data Structure/Tree/AVL tree/README.md +++ b/Data Structure/Tree/AVL tree/README.md @@ -1,4 +1,4 @@ #### Reference - - exaplaination: https://www.youtube.com/watch?v=jDM6_TnYIqE&t=1426s + - explanation: https://www.youtube.com/watch?v=jDM6_TnYIqE&t=1426s - code: https://www.geeksforgeeks.org/avl-tree-set-1-insertion/ diff --git a/Data Structure/Tree/Binary search tree/Adjacent Next/Adjacent_Next or Inorder_Successor(soi).cpp b/Data Structure/Tree/Binary search tree/Adjacent Next/Adjacent_Next or Inorder_Successor(soi).cpp index d196d9ec..85803043 100644 --- a/Data Structure/Tree/Binary search tree/Adjacent Next/Adjacent_Next or Inorder_Successor(soi).cpp +++ b/Data Structure/Tree/Binary search tree/Adjacent Next/Adjacent_Next or Inorder_Successor(soi).cpp @@ -39,7 +39,7 @@ int findNext(struct Node *head, int data) //then go to the right subtree, just right node getSearchNode = getSearchNode->right; //traverse that just right node left subtree until the pointer hit NULL - //When pointer hit hit NULL, thats means there is no node other node in it's left, + //When pointer hit hit NULL, that's means there is no node other node in it's left, //and this the just next node of out given node or data. while (getSearchNode->left != NULL) { @@ -140,14 +140,14 @@ struct Node *insert(int data, struct Node *head){ if (data < head->data){ temp2 = insert(data, head->left); head->left = temp2; - //set currrent node as a parent of new node. + //set current node as a parent of new node. temp2->parent = head; } else{ temp2 = insert(data, head->right); head->right = temp2; - //set currrent node as a parent of new node. + //set current node as a parent of new node. temp2->parent = head; } return head; diff --git a/Data Structure/Tree/Binary search tree/Delete Full Tree/README.md b/Data Structure/Tree/Binary search tree/Delete Full Tree/README.md index 739a8aee..3a22c7f6 100644 --- a/Data Structure/Tree/Binary search tree/Delete Full Tree/README.md +++ b/Data Structure/Tree/Binary search tree/Delete Full Tree/README.md @@ -1,6 +1,6 @@ To delete a binary, if we just use "delete head", then instead of deleting the whole tree, it will just free the head or root pointer of the tree, but the other pointers of the tree's nodes still allocated in the memory because dynamic memory allocation or explicitly -allocated memmory by user is allocated memory in the heap section, which have to explicitly freed by user. +allocated memory by user is allocated memory in the heap section, which have to explicitly freed by user. So, this leads to memory leak. To avoid this situation we have free every pointers or every nodes from the tree. diff --git a/Data Structure/Tree/Binary search tree/Detele/Delete.cpp b/Data Structure/Tree/Binary search tree/Detele/Delete.cpp index 16368025..97464abf 100644 --- a/Data Structure/Tree/Binary search tree/Detele/Delete.cpp +++ b/Data Structure/Tree/Binary search tree/Detele/Delete.cpp @@ -11,7 +11,7 @@ struct Node{ struct Node* right; }; -//All neccessary function declearation... +//All necessary function declearation... struct Node *insert(struct Node *head, int data); void display(struct Node *head); struct Node *FindMin(struct Node *head); @@ -33,7 +33,7 @@ struct Node *deleteNode(struct Node *head, int data){ head->right = deleteNode(head->right, data); } - //If none of this above, that means we are find the given data or node postion... + //If none of this above, that means we are find the given data or node position... else{ // 1. If the node has no child. //If the node has no right and left child, that means it is the leaf node, we can delete the node diff --git a/Data Structure/Tree/Binary search tree/Height/height.cpp b/Data Structure/Tree/Binary search tree/Height/height.cpp index 2fca5283..c6fc0da0 100644 --- a/Data Structure/Tree/Binary search tree/Height/height.cpp +++ b/Data Structure/Tree/Binary search tree/Height/height.cpp @@ -1,14 +1,14 @@ // The height of a binary tree is the number of edges between the tree's root and its furthest leaf // This function compute the height of the tree... - // We can also just use -1 in base case wher root == NULL, that also produce correct reults. + // We can also just use -1 in base case where root == NULL, that also produce correct reults. - //This one is my own defintion of code. + //This one is my own definition of code. // We need two base case here... // 1. If any node is NULL // 2. Another if a node right & left both subtree is NULL // If we just use root == NULL base case we get height + 1 - // bacause when we go deep, without middle base case we go to a position where node is NULL + // because when we go deep, without middle base case we go to a position where node is NULL // But when we return from there, as we recursively add 1 to compute height // we add 1 here also, but there no edges between leaf and NULL pointer. // So we add the middle base case to identify the leaf node and return from there diff --git a/Data Structure/Tree/Binary search tree/Merge/merge_two_tree(geek_for_geek_methods).cpp b/Data Structure/Tree/Binary search tree/Merge/merge_two_tree(geek_for_geek_methods).cpp index 5f774430..4bcb3615 100644 --- a/Data Structure/Tree/Binary search tree/Merge/merge_two_tree(geek_for_geek_methods).cpp +++ b/Data Structure/Tree/Binary search tree/Merge/merge_two_tree(geek_for_geek_methods).cpp @@ -1,5 +1,5 @@ // https://www.geeksforgeeks.org/merge-two-binary-trees-node-sum/ -// This merge completely merge two tree by add every poistion nodes value from two different tree. +// This merge completely merge two tree by add every position nodes value from two different tree. // Input: @@ -22,7 +22,7 @@ struct Node* mergeTree(struct Node* tree1, struct Node* tree2){ // if tree1 or tree2 == NULL, means one tree current node is NULL, then we return other tree node. // other tree may have there node or not, if there is node then that node & it's descendent return from this position - // automatically insert to the corresponding postion of our merge node. + // automatically insert to the corresponding position of our merge node. // if not, like other tree has also no node there, means NULL, then NULL return from there. if( ! tree1) return tree2; @@ -44,4 +44,4 @@ struct Node* mergeTree(struct Node* tree1, struct Node* tree2){ } -// As this is a recursive procedure, so think all recursivly, you will understand easily.... +// As this is a recursive procedure, so think all recursively, you will understand easily.... diff --git a/Data Structure/Tree/Binary search tree/Order statistic/README.md b/Data Structure/Tree/Binary search tree/Order statistic/README.md index d9a05f82..f5d44ebe 100644 --- a/Data Structure/Tree/Binary search tree/Order statistic/README.md +++ b/Data Structure/Tree/Binary search tree/Order statistic/README.md @@ -1,7 +1,7 @@ ### Order statistics of Binary Search Tree. [Order statistic tree](https://en.wikipedia.org/wiki/Order_statistic_tree) -[Coursera explaination](https://www.coursera.org/learn/data-structures/lecture/DWPyG/applications) +[Coursera explanation](https://www.coursera.org/learn/data-structures/lecture/DWPyG/applications) [Finding the Kth smallest element](https://www.geeksforgeeks.org/find-k-th-smallest-element-in-bst-order-statistics-in-bst/) [Computing rank of a node in a binary search tree](https://stackoverflow.com/questions/26080924/computing-rank-of-a-node-in-a-binary-search-tree) diff --git a/Data Structure/Tree/Binary search tree/Order statistic/find_Kth_smallest_element.cpp b/Data Structure/Tree/Binary search tree/Order statistic/find_Kth_smallest_element.cpp index 121dd2ff..13a9e790 100644 --- a/Data Structure/Tree/Binary search tree/Order statistic/find_Kth_smallest_element.cpp +++ b/Data Structure/Tree/Binary search tree/Order statistic/find_Kth_smallest_element.cpp @@ -18,7 +18,7 @@ int OrderStatistitcs(struct TreeNode* head, int k){ // here (s+1) represent the next node of tree which left subtree size we have measured. - // Suppose if the left subtree size is 3, then we actullay have 3 nodes before the. + // Suppose if the left subtree size is 3, then we actually have 3 nodes before the. // so this will compare with the 3 + 1 = 4th node. // if the Kth position macth with the any node, means we find the Kth node, return the value of the node. if(k == s+1) { diff --git a/Data Structure/Tree/Binary search tree/Order statistic/rank_of_tree.cpp b/Data Structure/Tree/Binary search tree/Order statistic/rank_of_tree.cpp index cccb9878..f88098f2 100644 --- a/Data Structure/Tree/Binary search tree/Order statistic/rank_of_tree.cpp +++ b/Data Structure/Tree/Binary search tree/Order statistic/rank_of_tree.cpp @@ -16,7 +16,7 @@ int rank_of_tree(struct TreeNode* root, int data){ - // intialize the rank as 0. + // initialize the rank as 0. int rank = 0; // while root not encounter NULL. @@ -32,7 +32,7 @@ int rank_of_tree(struct TreeNode* root, int data){ // when we go to the right of the tree, then we have to also count the left subtree size with root node. // because we are going (size of left subtree + root node) far from the current node. - // also we can think as, if we go to a node right subtree, then the node's left subtree & the node itselt + // also we can think as, if we go to a node right subtree, then the node's left subtree & the node itself // ahead of any node of node's right subtree. rank += 1 + treeSize(root->left); diff --git a/Data Structure/Tree/Binary search tree/RangeSearch/Range Search(vector).cpp b/Data Structure/Tree/Binary search tree/RangeSearch/Range Search(vector).cpp index f86f9518..212de528 100644 --- a/Data Structure/Tree/Binary search tree/RangeSearch/Range Search(vector).cpp +++ b/Data Structure/Tree/Binary search tree/RangeSearch/Range Search(vector).cpp @@ -87,14 +87,14 @@ struct Node *insert(int data, struct Node *head){ if (data < head->data){ temp2 = insert(data, head->left); head->left = temp2; - //set currrent node as a parent of new node. + //set current node as a parent of new node. temp2->parent = head; } else{ temp2 = insert(data, head->right); head->right = temp2; - //set currrent node as a parent of new node. + //set current node as a parent of new node. temp2->parent = head; } return head; diff --git a/Data Structure/Tree/Binary search tree/RangeSearch/RangeSearch.cpp b/Data Structure/Tree/Binary search tree/RangeSearch/RangeSearch.cpp index 0922c44e..982c5fed 100644 --- a/Data Structure/Tree/Binary search tree/RangeSearch/RangeSearch.cpp +++ b/Data Structure/Tree/Binary search tree/RangeSearch/RangeSearch.cpp @@ -89,7 +89,7 @@ struct Node *insert(int data, struct Node *head) { temp2 = insert(data, head->left); head->left = temp2; - //set currrent node as a parent of new node. + //set current node as a parent of new node. temp2->parent = head; } @@ -97,7 +97,7 @@ struct Node *insert(int data, struct Node *head) { temp2 = insert(data, head->right); head->right = temp2; - //set currrent node as a parent of new node. + //set current node as a parent of new node. temp2->parent = head; } return head; diff --git a/Data Structure/Tree/Binary search tree/Traverse/Breadth first search/README.md b/Data Structure/Tree/Binary search tree/Traverse/Breadth first search/README.md index 4cafe7a8..95d2be8a 100644 --- a/Data Structure/Tree/Binary search tree/Traverse/Breadth first search/README.md +++ b/Data Structure/Tree/Binary search tree/Traverse/Breadth first search/README.md @@ -1,9 +1,9 @@ -## Breadth first serch also called level order traversal. +## Breadth first search also called level order traversal. When applied to infinite graphs represented implicitly, breadth-first search will eventually find the goal state, but depth first search may get lost in parts of the graph that have no goal state and never return Link -> https://en.wikipedia.org/wiki/Breadth-first_search Link -> https://www.geeksforgeeks.org/level-order-tree-traversal/ -#### In geeksforgeeks link has code to traverse level order without using auxillary space & +#### In geeksforgeeks link has code to traverse level order without using auxiliary space & #### using queue( the queue made of linked list). diff --git a/Data Structure/Tree/Binary search tree/Traverse/README.md b/Data Structure/Tree/Binary search tree/Traverse/README.md index b74ef993..892ae783 100644 --- a/Data Structure/Tree/Binary search tree/Traverse/README.md +++ b/Data Structure/Tree/Binary search tree/Traverse/README.md @@ -36,7 +36,7 @@ Recursively traverse the current node's left subtree. Depth first search also called Level-Order-Traversal, but the word DSF mainly used for graph as graph may have cycle, so if we visit a -node once, we don't visit that node again. If we visit that node again, then we can fall on infinte loop in graph. +node once, we don't visit that node again. If we visit that node again, then we can fall on infinite loop in graph. So, DFS & BFS word mainly used for Graph. In tree the DFS also we can called as Level-Order-Traversal. diff --git a/Data Structure/Tree/Binary search tree/Traverse/Vertical Order Traverse/vertical_order_traverse(recursion).cpp b/Data Structure/Tree/Binary search tree/Traverse/Vertical Order Traverse/vertical_order_traverse(recursion).cpp index 6ad3893f..28eb0cbf 100644 --- a/Data Structure/Tree/Binary search tree/Traverse/Vertical Order Traverse/vertical_order_traverse(recursion).cpp +++ b/Data Structure/Tree/Binary search tree/Traverse/Vertical Order Traverse/vertical_order_traverse(recursion).cpp @@ -1,4 +1,4 @@ -// explaination -> https://www.youtube.com/watch?v=PQKkr036wRc&t=184s +// explanation -> https://www.youtube.com/watch?v=PQKkr036wRc&t=184s // code reference -> https://www.geeksforgeeks.org/print-binary-tree-vertical-order/ diff --git a/Data Structure/Tree/Binary search tree/_treeSize.cpp b/Data Structure/Tree/Binary search tree/_treeSize.cpp index 1c01c99e..06e35c89 100644 --- a/Data Structure/Tree/Binary search tree/_treeSize.cpp +++ b/Data Structure/Tree/Binary search tree/_treeSize.cpp @@ -5,6 +5,6 @@ int treeSize(struct TreeNode* head){ // recursively go for sleft subtree & right subtree, // we get the size of left subtree & right subtree, add two subtree sizes, and +1 for current node. - // whose left & right subtree is also called recursivly. + // whose left & right subtree is also called recursively. return treeSize(head->left) + treeSize(head->right) + 1; } diff --git a/Data Structure/Tree/Binary search tree/is Binary search tree/isBST(inroder_traversal).cpp b/Data Structure/Tree/Binary search tree/is Binary search tree/isBST(inroder_traversal).cpp index ec81cfd1..e1dedcab 100644 --- a/Data Structure/Tree/Binary search tree/is Binary search tree/isBST(inroder_traversal).cpp +++ b/Data Structure/Tree/Binary search tree/is Binary search tree/isBST(inroder_traversal).cpp @@ -1,5 +1,5 @@ // Check binary tree or not by inroder traversal -// we know in inorder traversal of depth first serach in a binary tree always result a sorted order value. +// we know in inorder traversal of depth first search in a binary tree always result a sorted order value. // So we can easily check that if our binary tree is BST or not by keep track of previous traversed node value. // this method is sometime give wrong result, in like below tree diff --git a/Data Structure/Tree/Binary tree/Adjacent Next/Adjacent_Next(soi).cpp b/Data Structure/Tree/Binary tree/Adjacent Next/Adjacent_Next(soi).cpp index 156fedf6..e9243d08 100644 --- a/Data Structure/Tree/Binary tree/Adjacent Next/Adjacent_Next(soi).cpp +++ b/Data Structure/Tree/Binary tree/Adjacent Next/Adjacent_Next(soi).cpp @@ -45,7 +45,7 @@ int findNext(struct Node *head, int data) //then go to the right subtree, just right node getSearchNode = getSearchNode->right; //traverse that just right node left subtree until the pointer hit NULL - //When pointer hit hit NULL, thats means there is no node other node in it's left, + //When pointer hit hit NULL, that's means there is no node other node in it's left, //and this the just next node of out given node or data. while (getSearchNode->left != NULL) { @@ -148,14 +148,14 @@ struct Node *insert(int data, struct Node *head){ if (data < head->data){ temp2 = insert(data, head->left); head->left = temp2; - //set currrent node as a parent of new node. + //set current node as a parent of new node. temp2->parent = head; } else{ temp2 = insert(data, head->right); head->right = temp2; - //set currrent node as a parent of new node. + //set current node as a parent of new node. temp2->parent = head; } return head; diff --git a/Data Structure/Tree/Binary tree/Binary_tree.cpp b/Data Structure/Tree/Binary tree/Binary_tree.cpp index b2dae6c6..2f79ea4c 100644 --- a/Data Structure/Tree/Binary tree/Binary_tree.cpp +++ b/Data Structure/Tree/Binary tree/Binary_tree.cpp @@ -14,7 +14,7 @@ struct Node* head; //Get new node and set data. struct Node* getNode(int data){ - //Dynamic memory allocation fron heap. + //Dynamic memory allocation from heap. struct Node* temp = (struct Node*) malloc(sizeof(struct Node)); temp->data = data; temp->right = NULL; diff --git a/Data Structure/Tree/Binary tree/RangeSearch/Range Search(vector).cpp b/Data Structure/Tree/Binary tree/RangeSearch/Range Search(vector).cpp index f86f9518..212de528 100644 --- a/Data Structure/Tree/Binary tree/RangeSearch/Range Search(vector).cpp +++ b/Data Structure/Tree/Binary tree/RangeSearch/Range Search(vector).cpp @@ -87,14 +87,14 @@ struct Node *insert(int data, struct Node *head){ if (data < head->data){ temp2 = insert(data, head->left); head->left = temp2; - //set currrent node as a parent of new node. + //set current node as a parent of new node. temp2->parent = head; } else{ temp2 = insert(data, head->right); head->right = temp2; - //set currrent node as a parent of new node. + //set current node as a parent of new node. temp2->parent = head; } return head; diff --git a/Data Structure/Tree/Binary tree/RangeSearch/RangeSearch.cpp b/Data Structure/Tree/Binary tree/RangeSearch/RangeSearch.cpp index 0922c44e..982c5fed 100644 --- a/Data Structure/Tree/Binary tree/RangeSearch/RangeSearch.cpp +++ b/Data Structure/Tree/Binary tree/RangeSearch/RangeSearch.cpp @@ -89,7 +89,7 @@ struct Node *insert(int data, struct Node *head) { temp2 = insert(data, head->left); head->left = temp2; - //set currrent node as a parent of new node. + //set current node as a parent of new node. temp2->parent = head; } @@ -97,7 +97,7 @@ struct Node *insert(int data, struct Node *head) { temp2 = insert(data, head->right); head->right = temp2; - //set currrent node as a parent of new node. + //set current node as a parent of new node. temp2->parent = head; } return head; diff --git a/Data Structure/Tree/Generic Tree/Height/height(bfs).cpp b/Data Structure/Tree/Generic Tree/Height/height(bfs).cpp index 639fe6fd..1d78c812 100644 --- a/Data Structure/Tree/Generic Tree/Height/height(bfs).cpp +++ b/Data Structure/Tree/Generic Tree/Height/height(bfs).cpp @@ -1,4 +1,4 @@ -// This below link vedio made for graph, but also work same for generic tree +// This below link video made for graph, but also work same for generic tree // https://www.youtube.com/watch?v=ZR9f2YIFHD0&list=PLlOmh-YAEmsA3TaCvAAQjXrgeZKWxEuak&index=11 // The array we used to build the tree, this image can found in -> https://www.geeksforgeeks.org/height-generic-tree-parent-array/ // also we draw here. diff --git a/Data Structure/Tree/Generic Tree/Height/height(recursion).cpp b/Data Structure/Tree/Generic Tree/Height/height(recursion).cpp index 705402e5..daf0e9d8 100644 --- a/Data Structure/Tree/Generic Tree/Height/height(recursion).cpp +++ b/Data Structure/Tree/Generic Tree/Height/height(recursion).cpp @@ -2,11 +2,11 @@ #include using namespace std; -// This code doesn't work with big cases, beacuse the recursion will lead to stack overflow, for big input use +// This code doesn't work with big cases, because the recursion will lead to stack overflow, for big input use // bfs to find the height -> https://github.com/SazinSamin/Samin_Reading_Room/blob/main/Data%20Structure/Tree/Generic%20Tree/Height/height(bfs).cpp // To understand how the given array represent the tree, see the README.md file of generic tree folder. -// In this code we get the hieght of tree by traversing from each node to it's parent node. +// In this code we get the height of tree by traversing from each node to it's parent node. // & return the distance from that node to parent node // Which "node to distant" is most, that will be the height of the tree. @@ -46,7 +46,7 @@ int main(){ for(int i=0; i max){ max = result; } diff --git a/Data Structure/Tree/Generic Tree/Level order(breath first) traversal/breadth_first_search (vector).cpp b/Data Structure/Tree/Generic Tree/Level order(breath first) traversal/breadth_first_search (vector).cpp index 96adf5d9..08947dfd 100644 --- a/Data Structure/Tree/Generic Tree/Level order(breath first) traversal/breadth_first_search (vector).cpp +++ b/Data Structure/Tree/Generic Tree/Level order(breath first) traversal/breadth_first_search (vector).cpp @@ -1,4 +1,4 @@ -// This below link vedio made for graph, but also work same for generic tree +// This below link video made for graph, but also work same for generic tree // https://www.youtube.com/watch?v=ZR9f2YIFHD0&list=PLlOmh-YAEmsA3TaCvAAQjXrgeZKWxEuak&index=11 diff --git a/Data Structure/Tree/Generic Tree/README.md b/Data Structure/Tree/Generic Tree/README.md index 5584beaa..f29cf2e8 100644 --- a/Data Structure/Tree/Generic Tree/README.md +++ b/Data Structure/Tree/Generic Tree/README.md @@ -1,4 +1,4 @@ -### Generic tree has similary with adjacency list graph data structure(as tree is a special kind of graph). +### Generic tree has similarly with adjacency list graph data structure(as tree is a special kind of graph). @@ -8,7 +8,7 @@ Link -> https://github.com/SazinSamin/Samin_Reading_Room/tree/main/Data%20Struct Link -> https://www.geeksforgeeks.org/generic-treesn-array-trees/ -When we gat array for contruct a tree, the array explain that +When we gat array for construct a tree, the array explain that Like we have an array this -> int array[] = {4, -1, 4, 1, 1}; diff --git a/Data Structure/need_to_implement.txt b/Data Structure/need_to_implement.txt index df58d085..6a936e83 100644 --- a/Data Structure/need_to_implement.txt +++ b/Data Structure/need_to_implement.txt @@ -1 +1 @@ -[LRU chache](https://www.geeksforgeeks.org/lru-cache-implementation/) +[LRU cache](https://www.geeksforgeeks.org/lru-cache-implementation/) diff --git a/Data Structure/priority_queue, heap/priority_queue_array_implementation.c b/Data Structure/priority_queue, heap/priority_queue_array_implementation.c index 74b0c99a..1e1fa947 100644 --- a/Data Structure/priority_queue, heap/priority_queue_array_implementation.c +++ b/Data Structure/priority_queue, heap/priority_queue_array_implementation.c @@ -1,5 +1,5 @@ //Priority_queue array implementation -//Priority will be coresponding data value +//Priority will be corresponding data value #include using namespace std; diff --git a/Database/Structure Query Language/0007_Order_By.sql b/Database/Structure Query Language/0007_Order_By.sql index ed686a79..b4f4c8fb 100644 --- a/Database/Structure Query Language/0007_Order_By.sql +++ b/Database/Structure Query Language/0007_Order_By.sql @@ -1,4 +1,4 @@ --- sort the data by ascending order(mention ASC is not nessary, as it is default behaviour) +-- sort the data by ascending order(mention ASC is not necessary, as it is default behaviour) SELECT * FROM countries ORDER BY area ASC; -- sort the data by descending order diff --git a/Database/Structure Query Language/0011_Logical.sql b/Database/Structure Query Language/0011_Logical.sql index 5bbb4367..16a18b59 100644 --- a/Database/Structure Query Language/0011_Logical.sql +++ b/Database/Structure Query Language/0011_Logical.sql @@ -9,7 +9,7 @@ SELECT * FROM country_stats WHERE year > 2000 AND (gdp < 100000000 OR population SELECT * FROM countries WHERE name='Bangladesh' OR name='China' OR name='Uzbekistan'; -- Instead of giving too many (or) we can match using (IN) SELECT * FROM countries WHERE name IN('Bangladesh', 'China', 'Uzbekistan'); --- NOT IN (Exact oposite of IN) +-- NOT IN (Exact opposite of IN) SELECT * FROM countries WHERE name NOT IN('Bangladesh', 'China', 'Uzbekistan'); diff --git a/Database/Structure Query Language/0013_Constraints.sql b/Database/Structure Query Language/0013_Constraints.sql index 6691ff3b..dcfede7c 100644 --- a/Database/Structure Query Language/0013_Constraints.sql +++ b/Database/Structure Query Language/0013_Constraints.sql @@ -47,11 +47,11 @@ CREATE TABLE Grades( grade_id int(5), CGPA float(3, 2), PRIMARY KEY (grade_id), - -- here we set a constraint that the cgpa should not excedeed 4.00 + -- here we set a constraint that the cgpa should not exceeded 4.00 CHECK (CGPA <= 4.00) ); --- drop constrints; +-- drop constraints; ALTER TABLE Grades DROP INDEX CGPA; -- can't able to run this code diff --git a/Database/Structure Query Language/0014_Upadate.sql b/Database/Structure Query Language/0014_Upadate.sql index 74eb2f86..6c17f22d 100644 --- a/Database/Structure Query Language/0014_Upadate.sql +++ b/Database/Structure Query Language/0014_Upadate.sql @@ -1,3 +1,3 @@ --- If we forget to give condition(WHERE), sql will update all the row(So be carefull) +-- If we forget to give condition(WHERE), sql will update all the row(So be careful) UPDATE Student SET Age=26 WHERE Name="Akash"; diff --git a/Database/Structure Query Language/0017_Alter.sql b/Database/Structure Query Language/0017_Alter.sql index 4b5ce801..38abe3b8 100644 --- a/Database/Structure Query Language/0017_Alter.sql +++ b/Database/Structure Query Language/0017_Alter.sql @@ -4,7 +4,7 @@ ALTER TABLE Student ADD GPA float(3, 2); -- change column name (change column only for changing the name of column) ALTER TABLE Student CHANGE GPA CGPA float(5, 4); --- modify for increase or decrease the column size, change constrints etc +-- modify for increase or decrease the column size, change constraints etc ALTER TABLE UIU MODIFY Name varchar(25); -- change vs modify -> https://stackoverflow.com/a/14767467 diff --git a/Database/Structure Query Language/0023_VIEW.sql b/Database/Structure Query Language/0023_VIEW.sql index b18927fc..2a3b980b 100644 --- a/Database/Structure Query Language/0023_VIEW.sql +++ b/Database/Structure Query Language/0023_VIEW.sql @@ -1,4 +1,4 @@ --- carefull VIEW change the original as data -> https://stackoverflow.com/a/2648600/10928027 +-- careful VIEW change the original as data -> https://stackoverflow.com/a/2648600/10928027 -- create VIEW from single table. diff --git a/Database/Structure Query Language/Basic.txt b/Database/Structure Query Language/Basic.txt index df0a61b4..e273c233 100644 --- a/Database/Structure Query Language/Basic.txt +++ b/Database/Structure Query Language/Basic.txt @@ -1,3 +1,3 @@ SHOW DATABASES; (Show the all databases) CREATE DATABASES ; (Create a database) -DTOP DATABASES ; (Drop a database) +DTOP DATABASES ; (Drop a database) diff --git a/Documentation/Anonymous Function/README.md b/Documentation/Anonymous Function/README.md index 82546b85..73ce5c2e 100644 --- a/Documentation/Anonymous Function/README.md +++ b/Documentation/Anonymous Function/README.md @@ -1,4 +1,4 @@ -As far I know to become make "anonymous function" a programming lanuage should treat function a first class member. +As far I know to become make "anonymous function" a programming language should treat function a first class member. First Class functions can: // Be stored in variables diff --git a/Documentation/Closure/001_example.js b/Documentation/Closure/001_example.js index c8376070..44c18cb1 100644 --- a/Documentation/Closure/001_example.js +++ b/Documentation/Closure/001_example.js @@ -20,13 +20,13 @@ function getA(a) { } const myFunc = getA(10); -// even the getA() function execution reaches the end, the inner function still has acecess to the +// even the getA() function execution reaches the end, the inner function still has access to the // variable myFunc(20); // another example function count() { - // because of closure this counter variable will retain after finish this funciton execution + // because of closure this counter variable will retain after finish this function execution let counter = 0; function increment() { counter ++; diff --git a/Javascript/Advance/Debounce/Debounce.js b/Javascript/Advance/Debounce/Debounce.js index 3d76130b..ce26c7fb 100644 --- a/Javascript/Advance/Debounce/Debounce.js +++ b/Javascript/Advance/Debounce/Debounce.js @@ -12,7 +12,7 @@ const button = document.getElementById("button"); -// debounce hanlder +// debounce handler // request will make to server after some time, if another request come in between that time. // first we clear the previous request and accept only the recent request. function debounce (fn, delay) { diff --git a/Javascript/Advance/Iterator/0002_Custom_iterator.js b/Javascript/Advance/Iterator/0002_Custom_iterator.js index 7a6e4fa9..7a8c2d83 100644 --- a/Javascript/Advance/Iterator/0002_Custom_iterator.js +++ b/Javascript/Advance/Iterator/0002_Custom_iterator.js @@ -1,5 +1,5 @@ -// custome iterator, override the built-in iterator method in js. +// custom iterator, override the built-in iterator method in js. Array.prototype[Symbol.iterator] = function () { let count = this.length; let arr = this; diff --git a/Javascript/Async/0001_execution_order.js b/Javascript/Async/0001_execution_order.js index 588ee9c9..5525ea96 100644 --- a/Javascript/Async/0001_execution_order.js +++ b/Javascript/Async/0001_execution_order.js @@ -1,4 +1,4 @@ -// JS funciton are executed accroding to they have called, not they are defined. +// JS function are executed according to they have called, not they are defined. function x() { console.log("Function X"); diff --git a/Javascript/Async/0002_Callback/0002_Callback_function.js b/Javascript/Async/0002_Callback/0002_Callback_function.js index 16af5573..9dae3215 100644 --- a/Javascript/Async/0002_Callback/0002_Callback_function.js +++ b/Javascript/Async/0002_Callback/0002_Callback_function.js @@ -5,10 +5,10 @@ function displayResult(res) { console.log(res); } -// here we recieve a function as an argument -> "displayFunc". +// here we receive a function as an argument -> "displayFunc". function getSum(a, b, displayFunc) { let result = a + b; - // callback that receieve function from here. + // callback that receive function from here. displayFunc(result); } diff --git a/Javascript/Async/0005_Async_Await/00031_block_execution_with_async.mjs b/Javascript/Async/0005_Async_Await/00031_block_execution_with_async.mjs index 09e7bb96..43db041b 100644 --- a/Javascript/Async/0005_Async_Await/00031_block_execution_with_async.mjs +++ b/Javascript/Async/0005_Async_Await/00031_block_execution_with_async.mjs @@ -4,7 +4,7 @@ import fetch from "node-fetch"; // The asynchronous operation means the result will come later. // if we want to block the other operation until the asynchronous operation result comes // then we can define a function with async, await and call the function. -// when we call the funciton it will be synchronous as normal function is synchronous +// when we call the function it will be synchronous as normal function is synchronous // so until the result of async doesn't come, it won't go to the next statement. // but remember inside a asynchronous function all statement aren't executed synchronously. diff --git a/Javascript/DOM/1112_Mthods/1114_querySelector.js b/Javascript/DOM/1112_Mthods/1114_querySelector.js index 754a8c0d..58e152d8 100644 --- a/Javascript/DOM/1112_Mthods/1114_querySelector.js +++ b/Javascript/DOM/1112_Mthods/1114_querySelector.js @@ -1,5 +1,5 @@ // return the first element match with the search -// if there is mulitple item in one condition, like same name multiple class +// if there is multiple item in one condition, like same name multiple class // then it return the first match // Also like there we have put to select last item of any item list, so if there are multiple items as last items, then it return // the first siblings diff --git a/Javascript/DOM/1113_Navigation/1114_Navigation.js b/Javascript/DOM/1113_Navigation/1114_Navigation.js index 0f9dd8e5..942feb50 100644 --- a/Javascript/DOM/1113_Navigation/1114_Navigation.js +++ b/Javascript/DOM/1113_Navigation/1114_Navigation.js @@ -13,7 +13,7 @@ let nextSibling = demo.nextSibling; let prevSibling = demo.previousSibling; -// like querySelector traverse from top to bottom to find a elemenet, +// like querySelector traverse from top to bottom to find a element, // closest do the reverse, from bottom(where the element belongs) to top for the element. let grandFather = demo.closest(".item"); diff --git a/Javascript/DOM/1115_Events/1000_information.txt b/Javascript/DOM/1115_Events/1000_information.txt index c422ac5a..5ec36f76 100644 --- a/Javascript/DOM/1115_Events/1000_information.txt +++ b/Javascript/DOM/1115_Events/1000_information.txt @@ -8,4 +8,4 @@ get the element that triggered the element using *** the difference of above two method that suppose a div with many childrent =event.currentTarget only return the "div" click anywhere in that div. -=event.target that exact content was clicked, like if clicked happend in childrent area then that childrent, if div area then div +=event.target that exact content was clicked, like if clicked happened in childrent area then that childrent, if div area then div diff --git a/Javascript/Data Structure/Built In/Array/0001_example1.js b/Javascript/Data Structure/Built In/Array/0001_example1.js index 4ef744ad..9ade9caa 100644 --- a/Javascript/Data Structure/Built In/Array/0001_example1.js +++ b/Javascript/Data Structure/Built In/Array/0001_example1.js @@ -1,4 +1,4 @@ -// arrray in JS is mutable. +// array in JS is mutable. diff --git a/Javascript/Data Structure/Built In/README.md b/Javascript/Data Structure/Built In/README.md index d2ab4158..342d976e 100644 --- a/Javascript/Data Structure/Built In/README.md +++ b/Javascript/Data Structure/Built In/README.md @@ -1,4 +1,4 @@ -# Javasript +# Javascript ### Data structure #### Ref: [Sets](https://www.w3schools.com/js/js_object_sets.asp), [Maps](https://www.w3schools.com/js/js_object_maps.asp) we can also store unique data using array by diff --git a/Javascript/Data Structure/Built In/Spread_operator(...arr).js b/Javascript/Data Structure/Built In/Spread_operator(...arr).js index 03dfe376..977f5232 100644 --- a/Javascript/Data Structure/Built In/Spread_operator(...arr).js +++ b/Javascript/Data Structure/Built In/Spread_operator(...arr).js @@ -17,9 +17,9 @@ console.log(arr2); // spread operator in function arguments. -// spread operator in function are same like called "rest paramters" which aceept an indefinite parameters. -// a function definition only can have one "rest paramters". -// rest parameters have to be the last paramters of a function definition. +// spread operator in function are same like called "rest parameters" which aceept an indefinite parameters. +// a function definition only can have one "rest parameters". +// rest parameters have to be the last parameters of a function definition. // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters diff --git a/Javascript/Data Structure/Built In/concat().js b/Javascript/Data Structure/Built In/concat().js index 56c7d809..bdb916e3 100644 --- a/Javascript/Data Structure/Built In/concat().js +++ b/Javascript/Data Structure/Built In/concat().js @@ -12,5 +12,5 @@ const c = a.concat(b); console.log(c); -// MDN website have written that concate() do shallow copy, means it actullay copy the reference, so if any array mutate, then it reflect +// MDN website have written that concate() do shallow copy, means it actually copy the reference, so if any array mutate, then it reflect // to another array as well, but don't find that on practical by mutating a, b , or c array. diff --git a/Javascript/Data Structure/Built In/every().js b/Javascript/Data Structure/Built In/every().js index bc5fa160..02de4c18 100644 --- a/Javascript/Data Structure/Built In/every().js +++ b/Javascript/Data Structure/Built In/every().js @@ -3,8 +3,8 @@ const arr = [10, 20, 30, 40, 50, 60]; -// every() return true if all the elements of an array statisfy the condition. -// if any of element can't statisfy the condition every immediate return false. +// every() return true if all the elements of an array satisfy the condition. +// if any of element can't satisfy the condition every immediate return false. // it doesn't mutate the original array. only return new true or false value. // empty array always return true. diff --git a/Javascript/Data Structure/Built In/find().js b/Javascript/Data Structure/Built In/find().js index 6effdad0..81c1ecbe 100644 --- a/Javascript/Data Structure/Built In/find().js +++ b/Javascript/Data Structure/Built In/find().js @@ -1,7 +1,7 @@ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find -// return the first element which statisfy the condition otherwire return "undefined". +// return the first element which satisfy the condition otherwire return "undefined". const array = [1, 3, 5, 7, 8, 9, 11]; diff --git a/Javascript/Data Structure/Built In/join().js b/Javascript/Data Structure/Built In/join().js index a0881db3..5ee2348a 100644 --- a/Javascript/Data Structure/Built In/join().js +++ b/Javascript/Data Structure/Built In/join().js @@ -6,7 +6,7 @@ const array = ['B', 'a', 'n', 'l', 'a', 'd', 'e', 's', 'h']; // without any parameter element will joined togerther by comma(,); const res1 = array.join(); -// if seperater is an empty string, all elements joined together without any gap +// if separator is an empty string, all elements joined together without any gap const res2 = array.join(''); const res3 = array.join('--'); diff --git a/Javascript/Data Structure/Built In/reduce().js b/Javascript/Data Structure/Built In/reduce().js index 1c013084..29b257db 100644 --- a/Javascript/Data Structure/Built In/reduce().js +++ b/Javascript/Data Structure/Built In/reduce().js @@ -22,7 +22,7 @@ console.log(getSum(array)); -// couting elements count +// counting elements count const names = ["Sazin", "Sazin", "Reshed", "Abid", "Megh"]; const func = names.reduce((prev, curr) => { @@ -35,7 +35,7 @@ const func = names.reduce((prev, curr) => { // here look, we have add a prev values or initial value as empty object {}, - // where we check & insert the elemenets, also return that object + // where we check & insert the elements, also return that object }, {} // initialValue ); @@ -49,7 +49,7 @@ console.log(func); // sum of value of object array. let sum = [{ x: 1 }, { x: 2 }, { x: 3 }].reduce(function (prev, curr) { // we have to give the initial value here. because, - // in first time we can acess the object previous & current value with prev.x & curr.x, but + // in first time we can access the object previous & current value with prev.x & curr.x, but // when it first calculation finish it, put it data to prev, when next time now then become, // just a numeric value, it can't access like prev.x which refer to the object value. diff --git a/Javascript/Data Structure/Built In/rest_operator.js b/Javascript/Data Structure/Built In/rest_operator.js index 7126352e..b163462f 100644 --- a/Javascript/Data Structure/Built In/rest_operator.js +++ b/Javascript/Data Structure/Built In/rest_operator.js @@ -1,9 +1,9 @@ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters // https://en.wikipedia.org/wiki/Variadic_function -// "rest paramters" which aceept an indefinite parameters. -// a function definition only can have one "rest paramters". -// rest parameters have to be the last paramters of a function definition. +// "rest parameters" which aceept an indefinite parameters. +// a function definition only can have one "rest parameters". +// rest parameters have to be the last parameters of a function definition. diff --git a/Javascript/Data Structure/Built In/reverse().js b/Javascript/Data Structure/Built In/reverse().js index 58bde1c0..e1a4a67b 100644 --- a/Javascript/Data Structure/Built In/reverse().js +++ b/Javascript/Data Structure/Built In/reverse().js @@ -5,7 +5,7 @@ array.reverse(); console.log(array); -// carefull, this below code doesn't work properly. +// careful, this below code doesn't work properly. const obj1 = { 1: 6, 2: 4, diff --git a/Javascript/Data Structure/Built In/slice().js b/Javascript/Data Structure/Built In/slice().js index dee0fd13..9e9a1209 100644 --- a/Javascript/Data Structure/Built In/slice().js +++ b/Javascript/Data Structure/Built In/slice().js @@ -2,7 +2,7 @@ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice // slice extract element from an array without modifying that, // take two parameter, start and end index, end index element will not be included. -// if end ommited it extract up to array length. +// if end omitted it extract up to array length. let array3 = array2.slice(0, 3); diff --git a/Javascript/Data Structure/Built In/some().js b/Javascript/Data Structure/Built In/some().js index 52cdd5ed..3412cba6 100644 --- a/Javascript/Data Structure/Built In/some().js +++ b/Javascript/Data Structure/Built In/some().js @@ -2,7 +2,7 @@ const arr = [10, 20, 30, 40, 50, 60]; -// some() will return true if one of the element statisfy the condition. +// some() will return true if one of the element satisfy the condition. // otherwise return false. // it doesn't mutate the original array. // call on an empty function return false in any condition. diff --git a/Javascript/Data Structure/Built In/sort().js b/Javascript/Data Structure/Built In/sort().js index 5193f423..56ba7250 100644 --- a/Javascript/Data Structure/Built In/sort().js +++ b/Javascript/Data Structure/Built In/sort().js @@ -3,7 +3,7 @@ const arr = [3, 7, 2, 8, 4, 9, 1]; // sort() first convert the array element into string, then use UTF-16 code for sorting. -// so, we should carefull because "80" will come before "9" according to string UTF-16 code +// so, we should careful because "80" will come before "9" according to string UTF-16 code // for sorting string or character we don't need below compareFunction. diff --git a/Javascript/Data Structure/Built In/splice().js b/Javascript/Data Structure/Built In/splice().js index 7b109406..03421e27 100644 --- a/Javascript/Data Structure/Built In/splice().js +++ b/Javascript/Data Structure/Built In/splice().js @@ -6,7 +6,7 @@ // splice(start, deleteCount, item1, item2, ...); // splice take 3 parameters, start for starting index, deleteCount is the amount of element to be // deleted consecutively & the last on is optional, which use for adding element to the array, -// we can add elements as much as we want by give them in comma seperated way. +// we can add elements as much as we want by give them in comma separated way. const array2 = ["He", "is", "a", "not", "good", "and" , "polite", "boy"]; diff --git a/Javascript/Data Structure/Built In/split().js b/Javascript/Data Structure/Built In/split().js index e18fb47e..01fe6c7f 100644 --- a/Javascript/Data Structure/Built In/split().js +++ b/Javascript/Data Structure/Built In/split().js @@ -3,22 +3,22 @@ // split(), split an string into substring. // return an array. -// take a pattern as parameter for seperation. +// take a pattern as parameter for separation. const str = "Bangladesh is a riverine country"; -// seperate by spaces. +// separate by spaces. const arr1 = str.split(' '); -// seperate each character. +// separate each character. const arr2 = str.split(''); // we can limit the speration also, after crossing limit, rest of string won't included. const arr22 = str.split('', 3); -// split also take mutiple character for seperation. +// split also take multiple character for separation. const arr3 = str.split('is'); console.log(arr1); diff --git a/Javascript/Data Structure/Built In/trim().js b/Javascript/Data Structure/Built In/trim().js index a7d46ce0..59e946c0 100644 --- a/Javascript/Data Structure/Built In/trim().js +++ b/Javascript/Data Structure/Built In/trim().js @@ -8,7 +8,7 @@ const res1 = string.trim(); console.log(res1); -// trimStart() for only remove whitespace from the begining. +// trimStart() for only remove whitespace from the beginning. // trimLeft() is the alias of trimeStart(). const res2 = string.trimStart(); // trimStart() for only remove whitespace from the ending. diff --git a/Javascript/Good_Practice/1111_strictMode+iife.js b/Javascript/Good_Practice/1111_strictMode+iife.js index 73850696..91967590 100644 --- a/Javascript/Good_Practice/1111_strictMode+iife.js +++ b/Javascript/Good_Practice/1111_strictMode+iife.js @@ -4,9 +4,9 @@ // https://www.coursera.org/learn/javascript-basics/lecture/thJcX/strategy-2-use-strict -// strict mode convert javascript silent error to throw erro +// strict mode convert javascript silent error to throw error // in strict mode, if you forget to use "var" in times of declearation of a variable, this will throw -// error immediatly. +// error immediately. "use strict"; diff --git a/Javascript/Good_Practice/1113_modulePattern.js b/Javascript/Good_Practice/1113_modulePattern.js index 3ee32b03..3e5971c2 100644 --- a/Javascript/Good_Practice/1113_modulePattern.js +++ b/Javascript/Good_Practice/1113_modulePattern.js @@ -1,7 +1,7 @@ // https://javascript.plainenglish.io/data-hiding-with-javascript-module-pattern-62b71520bddd -// properties & function defined inside a funciton +// properties & function defined inside a function function studentDetails(name, age, id) { // exposed properties let _name = name; @@ -15,7 +15,7 @@ function studentDetails(name, age, id) { return (_cgpa > 3.00) ? "Good" : "Not good"; } - // we exposing our desired properties by return from the funciton, + // we exposing our desired properties by return from the function, return { name: _name, age: _age, diff --git a/Javascript/JSON/0002_Parse.js b/Javascript/JSON/0002_Parse.js index 2ea20d50..a538e862 100644 --- a/Javascript/JSON/0002_Parse.js +++ b/Javascript/JSON/0002_Parse.js @@ -13,7 +13,7 @@ let json1 = `[ } ]`; -// parse json to covert json to js object. +// parse json to convert json to js object. let obj1 = JSON.parse(json1); console.log(obj1); console.log(obj1[0].name); diff --git a/Javascript/Javascript_execution_contest.js b/Javascript/Javascript_execution_contest.js index f1f40810..0f239593 100644 --- a/Javascript/Javascript_execution_contest.js +++ b/Javascript/Javascript_execution_contest.js @@ -2,7 +2,7 @@ // https://www.youtube.com/watch?v=Wk0-6b1W_VQ&list=PLHiZ4m8vCp9Nflbo9a0pZuLscG_Xc7DKq&index=10 -Gloabl execution context +Global execution context window: global object this: window // this points to window object topic: undefined diff --git a/Javascript/Methods/Function.length.js b/Javascript/Methods/Function.length.js index 6ae28ed6..27040aff 100644 --- a/Javascript/Methods/Function.length.js +++ b/Javascript/Methods/Function.length.js @@ -9,5 +9,5 @@ function g(a, b = 1, c) {} console.log(x.length); // 2 console.log(y.length); // 3 console.log(z.length); // 0 -console.log(f.length); // 0, rest paramter is not counter. -console.log(g.length); // only the parameter before the first default value paramter is counted. +console.log(f.length); // 0, rest parameter is not counter. +console.log(g.length); // only the parameter before the first default value parameter is counted. diff --git a/Javascript/OOP/Class Based/0001_Class.js b/Javascript/OOP/Class Based/0001_Class.js index 2a5edcdc..0435c2e3 100644 --- a/Javascript/OOP/Class Based/0001_Class.js +++ b/Javascript/OOP/Class Based/0001_Class.js @@ -3,7 +3,7 @@ class Person { // property declearation is optional, we can omit it, if we omit, the constructor will automatically - // create the property before initialization. But decleration is good for other programmer to + // create the property before initialization. But declaration is good for other programmer to // understand the code & identify the properties belongs to the class. // we also don't need to specify the data type inside the class. firstName; @@ -22,7 +22,7 @@ class Person { } }; -// initialize the instance variable through passing value to the constuctor +// initialize the instance variable through passing value to the constructor // and creation of a Class instance // We have to initialize object with keyword "new" nor it won't work. // The constructor is invoked when new is called to create a new object. diff --git a/Javascript/OOP/Class Based/00021_Privare_Properties.js b/Javascript/OOP/Class Based/00021_Privare_Properties.js index 7c15d137..9a15bdda 100644 --- a/Javascript/OOP/Class Based/00021_Privare_Properties.js +++ b/Javascript/OOP/Class Based/00021_Privare_Properties.js @@ -1,7 +1,7 @@ -// private variables & methods have only scope in class, means they are only avaiable inside the class, +// private variables & methods have only scope in class, means they are only available inside the class, // to declear a private property start the property name with #. class Person { diff --git a/Javascript/OOP/Class Based/0004_Static.js b/Javascript/OOP/Class Based/0004_Static.js index 35e64324..fc0b05aa 100644 --- a/Javascript/OOP/Class Based/0004_Static.js +++ b/Javascript/OOP/Class Based/0004_Static.js @@ -2,7 +2,7 @@ // class methods and variables belongs to class not instance, // we don't have to create instance of the class to use class variables and methods. -// so, they have consistancy of data. +// so, they have consistency of data. // in JS they defined with the keyword "static". diff --git a/Javascript/OOP/Class Based/0005_ClassMethod_VS_StaticMethod.js b/Javascript/OOP/Class Based/0005_ClassMethod_VS_StaticMethod.js index d724a011..c0acbaaa 100644 --- a/Javascript/OOP/Class Based/0005_ClassMethod_VS_StaticMethod.js +++ b/Javascript/OOP/Class Based/0005_ClassMethod_VS_StaticMethod.js @@ -21,7 +21,7 @@ class Person{ } }; -// instance memeber initialization +// instance member initialization const instance = new Person("Sazin", 24); const instanceMethod = instance.display(); console.log(instanceMethod); diff --git a/Javascript/OOP/Class Based/0007_Method_overloading(Polymorphism).js b/Javascript/OOP/Class Based/0007_Method_overloading(Polymorphism).js index 5c36fece..f2c0706d 100644 --- a/Javascript/OOP/Class Based/0007_Method_overloading(Polymorphism).js +++ b/Javascript/OOP/Class Based/0007_Method_overloading(Polymorphism).js @@ -1,11 +1,11 @@ // https://www.programiz.com/javascript/examples/function-overloading#:~:text=In%20programming%2C%20function%20overloading%20refers,at%20the%20last%20gets%20executed. // https://stackoverflow.com/questions/456177/function-overloading-in-javascript-best-practices -// Javascript doen't have native suppor for method overloading like Java or C++. +// Javascript doesn't have native support for method overloading like Java or C++. // But we can achieve that concept using // if-else & switch by // * counting the number of argument pass to the function -// * chceking the types of arguments +// * checking the types of arguments // * class Person { diff --git a/Javascript/OOP/Prototype Based/00021_Object_creation_behind_the_scene.js b/Javascript/OOP/Prototype Based/00021_Object_creation_behind_the_scene.js index ceceb387..4e027c00 100644 --- a/Javascript/OOP/Prototype Based/00021_Object_creation_behind_the_scene.js +++ b/Javascript/OOP/Prototype Based/00021_Object_creation_behind_the_scene.js @@ -35,7 +35,7 @@ function Student (name, age) { this.name = name; this.age = age; - // als we don't need to return the object, js will do for us + // also we don't need to return the object, js will do for us // return this; } diff --git a/Javascript/OOP/Prototype Based/0002_OwnProperty_&_Prototype.js b/Javascript/OOP/Prototype Based/0002_OwnProperty_&_Prototype.js index 86adf5a7..6d038530 100644 --- a/Javascript/OOP/Prototype Based/0002_OwnProperty_&_Prototype.js +++ b/Javascript/OOP/Prototype Based/0002_OwnProperty_&_Prototype.js @@ -7,13 +7,13 @@ // https://github.com/SazinSamin/Samin_Reading_Room/blob/main/Javascript/Objects/0007_Prototype.js -// In javascipt there are two types of property. +// In javascript there are two types of property. // "Own properties" & "Prototype". // Own properties are defined directly inside the Object. below example "firstName, lastName, age" -// are the own properties. That means p1 & p2 has own seprate copy of this properties. Every instance +// are the own properties. That means p1 & p2 has own separate copy of this properties. Every instance // we instantiate from this Object will have there own copy of these properties. function Person (fName, lName, age) { diff --git a/Javascript/OOP/Prototype Based/0003_Prototype.js b/Javascript/OOP/Prototype Based/0003_Prototype.js index 45112e52..847ddec9 100644 --- a/Javascript/OOP/Prototype Based/0003_Prototype.js +++ b/Javascript/OOP/Prototype Based/0003_Prototype.js @@ -7,7 +7,7 @@ // JS is a prototype based language // prototype helps us to add property directly outside the constructor function // every object in js has prototype & prototype chain. -// prototype also use for inhertance because if we add a prototype to a object, it will be avaiable to all instance. +// prototype also use for inheritance because if we add a prototype to a object, it will be available to all instance. // we can also add prototype to js built-in object like String, Number, Boolean (which is highly un-recommended) diff --git a/Javascript/OOP/Prototype Based/0006_Private_property(Encapsulation).js b/Javascript/OOP/Prototype Based/0006_Private_property(Encapsulation).js index c529914b..c600def7 100644 --- a/Javascript/OOP/Prototype Based/0006_Private_property(Encapsulation).js +++ b/Javascript/OOP/Prototype Based/0006_Private_property(Encapsulation).js @@ -4,7 +4,7 @@ function Person(fName, lNamge, age) { this.age = age; this.location = "Dhaka"; // we can make a variable private by create a variable inside the constructor function. - // by this the scope of the variable will just be avaiable inside the constructor, not globally like + // by this the scope of the variable will just be available inside the constructor, not globally like // the rest of others. // only the methods inside the constructor can have access & modify the variable. let pass = 123; diff --git a/Javascript/OOP/Prototype Based/README.md b/Javascript/OOP/Prototype Based/README.md index 35f2c17a..fc8c7b60 100644 --- a/Javascript/OOP/Prototype Based/README.md +++ b/Javascript/OOP/Prototype Based/README.md @@ -1,5 +1,5 @@ (GeeksForGeeks)[https://www.geeksforgeeks.org/introduction-object-oriented-programming-javascript/] -(Objec Basic)[https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Objects/Basics] +(Object Basic)[https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Objects/Basics] (Prototype)[https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Objects/Object_prototypes] (OOP)[https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Objects/Object-oriented_programming] [Object are mutable, then are pass by reference not by value](https://github.com/SazinSamin/Samin_Reading_Room/blob/main/Javascript/Good_Practice/1116_passbyValue_&_passbyReference.cpp). diff --git a/Javascript/Objects/0001_Object.js b/Javascript/Objects/0001_Object.js index 0f2e74dd..2dc059d2 100644 --- a/Javascript/Objects/0001_Object.js +++ b/Javascript/Objects/0001_Object.js @@ -11,7 +11,7 @@ console.log(`${person.firstName}, ${person.secondName}, ${person.age}`); // Objects are mutable: They are addressed by reference, not by value. -// here "x" is not the copy of the "person" object, it actullay reference to the person object or +// here "x" is not the copy of the "person" object, it actually reference to the person object or // that object memory location. // so any change to object "x" or "person", that reflect to the other object as well. const x = person; diff --git a/Javascript/Objects/0002_OwnProperty_&_Prototype.js b/Javascript/Objects/0002_OwnProperty_&_Prototype.js index 3bcf5100..5677a02c 100644 --- a/Javascript/Objects/0002_OwnProperty_&_Prototype.js +++ b/Javascript/Objects/0002_OwnProperty_&_Prototype.js @@ -7,7 +7,7 @@ // https://github.com/SazinSamin/Samin_Reading_Room/blob/main/Javascript/Objects/0007_Prototype.js -// In javascipt there are two types of property. +// In javascript there are two types of property. // "Own properties" & "Prototype". @@ -16,7 +16,7 @@ // Own properties are defined directly inside the Object. below example "firstName, lastName, age" -// are the own properties. That means p1 & p2 has own seprate copy of this properties. Every instance +// are the own properties. That means p1 & p2 has own separate copy of this properties. Every instance // we instantiate from this Object will have there own copy of these properties. function Person (fName, lName, age) { diff --git a/Javascript/Objects/0003_Method_&_this.js b/Javascript/Objects/0003_Method_&_this.js index 3e51f165..db0d446c 100644 --- a/Javascript/Objects/0003_Method_&_this.js +++ b/Javascript/Objects/0003_Method_&_this.js @@ -10,7 +10,7 @@ const person1 = { return `Name: ${this.firstName} ${this.lastName}\n birthYear: ${this.birthYear}`; }, - // we can refer to the object by avobe style {this.property} or by refering + // we can refer to the object by avobe style {this.property} or by referring // own variable by {objectName.property}. But the above one (this.property) is perfect & reusable, // because the {objectName.property} has a serious drawback that if the objectName has // changed, we have changed all the reference or objectName as well. @@ -22,7 +22,7 @@ const person1 = { console.log(person1.details()); console.log(person1.getFirstName()); -// without "()", the funciton defintion will return +// without "()", the function definition will return // addition of a method diff --git a/Javascript/Objects/0007_Prototype.js b/Javascript/Objects/0007_Prototype.js index 17ad6381..b2396b02 100644 --- a/Javascript/Objects/0007_Prototype.js +++ b/Javascript/Objects/0007_Prototype.js @@ -8,7 +8,7 @@ // JS is a prototype based language // prototype helps us to add property directly outside the constructor function // every object in js has prototype & prototype chain. -// prototype also use for inhertance because if we add a prototype to a object, it will be avaiable to all instance. +// prototype also use for inheritance because if we add a prototype to a object, it will be available to all instance. // we can also add prototype to js built-in object like String, Number, Boolean (which is highly un-recommended) diff --git a/Javascript/Objects/0010_freeze.js b/Javascript/Objects/0010_freeze.js index 9c66776d..98c6d66c 100644 --- a/Javascript/Objects/0010_freeze.js +++ b/Javascript/Objects/0010_freeze.js @@ -1,8 +1,8 @@ // https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/es6/prevent-object-mutation -// const does not alone make a variable completly immutable. const does only prevent the variable +// const does not alone make a variable completely immutable. const does only prevent the variable // from reassignment. That means we can still change the variable material from inside. -// So, to make the variable and it's variable completly immutable we have to freeze it through +// So, to make the variable and it's variable completely immutable we have to freeze it through // Object.freeze // Now we can't alter anything about that variable and strict mode if we try to do it will through an error diff --git a/Javascript/Objects/0013_Object_count_optimization.js b/Javascript/Objects/0013_Object_count_optimization.js index 1c7fe606..c8cfe750 100644 --- a/Javascript/Objects/0013_Object_count_optimization.js +++ b/Javascript/Objects/0013_Object_count_optimization.js @@ -18,8 +18,8 @@ function Person(name, age) { person.age = age; // here we do object count optimization - // if we define those two methods inside here, this will create and take sperate memory space - // everytime we create and return a object from this funciton. + // if we define those two methods inside here, this will create and take separate memory space + // every time we create and return a object from this function. // but if we take or refer from a other object(personMethods), these two methods already defined and created, so // it's create once and we just refer this here for our use. person.eat = personMethods.eat; diff --git a/Javascript/Objects/README.md b/Javascript/Objects/README.md index 1da89656..b537fbc0 100644 --- a/Javascript/Objects/README.md +++ b/Javascript/Objects/README.md @@ -6,7 +6,7 @@ -- Everything is Javascript create from master "Object" ------ -#### From function => Parantheses are needed to return an object. +#### From function => Parentheses are needed to return an object. ----- Some important properties: diff --git a/Javascript/Project/Basic Distance Project/index.html b/Javascript/Project/Basic Distance Project/index.html index 580eff23..419c5098 100644 --- a/Javascript/Project/Basic Distance Project/index.html +++ b/Javascript/Project/Basic Distance Project/index.html @@ -47,7 +47,7 @@ if (distanceKm != "NaN") { answer.innerHTML = `

${distance} miles: ${distanceKm}

`; } else { - answer.innerHTML = `

Error in convertion !

`; + answer.innerHTML = `

Error in conversion !

`; } }) diff --git a/Javascript/Project/Basic Distance Project/script.js b/Javascript/Project/Basic Distance Project/script.js index 7a73a3ac..339ac989 100644 --- a/Javascript/Project/Basic Distance Project/script.js +++ b/Javascript/Project/Basic Distance Project/script.js @@ -12,7 +12,7 @@ if (distanceKm != "NaN") { answer.innerHTML = `

${distance} miles: ${distanceKm}

`; } else { - answer.innerHTML = `

Error in convertion !

`; + answer.innerHTML = `

Error in conversion !

`; } }); })() \ No newline at end of file diff --git a/Javascript/Project/JavaScript_Basic_Challenges/Challenge_1_to_9.js b/Javascript/Project/JavaScript_Basic_Challenges/Challenge_1_to_9.js index 0a1c570b..74d18d09 100644 --- a/Javascript/Project/JavaScript_Basic_Challenges/Challenge_1_to_9.js +++ b/Javascript/Project/JavaScript_Basic_Challenges/Challenge_1_to_9.js @@ -47,7 +47,7 @@ console.log(firstName + " " + lastName); var firstName = "Sazin"; var lastName = "Samin"; -var adjective = "progammer" +var adjective = "programmer" console.log(`${firstName} ${lastName} is a very good ${adjective}`); @@ -73,7 +73,7 @@ console.log(`${firstName} ${lastName} is a very good ${adjective}`); // then display a sentence in the console that greets the // user by name and welcomes them. -var myname = prompt("What's you name ? ", "Apon"); +var myname = prompt("What's you name ? ", "Upon"); console.log(`Hello ${myname} and welcom`); diff --git a/Javascript/Project/Vacation Destination Project/README.md b/Javascript/Project/Vacation Destination Project/README.md index 9c7fd586..af693c24 100644 --- a/Javascript/Project/Vacation Destination Project/README.md +++ b/Javascript/Project/Vacation Destination Project/README.md @@ -1,4 +1,4 @@ # Vacation Destination List ### Project made using HTML, CSS and Javascript. -### Only Frontend avaiable now, Backend will be avaiable soon. +### Only Frontend available now, Backend will be available soon. diff --git a/Javascript/Project/Vacation Destination Project/script.js b/Javascript/Project/Vacation Destination Project/script.js index 87d11a9e..dbdcf1d0 100644 --- a/Javascript/Project/Vacation Destination Project/script.js +++ b/Javascript/Project/Vacation Destination Project/script.js @@ -11,7 +11,7 @@ // prevent default behaviour. evt.preventDefault(); - // retrive the info from the form + // retrieve the info from the form let dName = evt.target.elements['name'].value; let dLocation = evt.target.elements['location'].value; let dPhoto = evt.target.elements['photo'].value; diff --git a/Javascript/Raw/00041_comparision.js b/Javascript/Raw/00041_comparision.js index 540ab7d2..92199537 100644 --- a/Javascript/Raw/00041_comparision.js +++ b/Javascript/Raw/00041_comparision.js @@ -22,7 +22,7 @@ if (num1 == num2) { console.log("num 5 & string 5 are not same"); } -// comparision only become true when two variable types are same. +// comparison only become true when two variable types are same. if (num1 == num2) { console.log("num 5 & string 5 are same"); } else { diff --git a/Javascript/Raw/0007_Function/1121_parameter.js b/Javascript/Raw/0007_Function/1121_parameter.js index c30cc02d..9f798d86 100644 --- a/Javascript/Raw/0007_Function/1121_parameter.js +++ b/Javascript/Raw/0007_Function/1121_parameter.js @@ -3,7 +3,7 @@ // Function parameters are the names listed in the function definition. // Function arguments are the real values passed to(and received by) the function. -// we can send as many as argument as parameter, missing paramter will be as undefined +// we can send as many as argument as parameter, missing parameter will be as undefined // arguments are pass by value // Parameter Rules diff --git a/Javascript/Raw/0007_Function/116_declearation_Vs_expression.js b/Javascript/Raw/0007_Function/116_declearation_Vs_expression.js index 8e5e99ff..2c0c8777 100644 --- a/Javascript/Raw/0007_Function/116_declearation_Vs_expression.js +++ b/Javascript/Raw/0007_Function/116_declearation_Vs_expression.js @@ -6,4 +6,4 @@ function myFunc1(parameters) { } // function expression -const myFunc2 = function () { console.log("Javascipt")}; +const myFunc2 = function () { console.log("Javascript")}; diff --git a/Javascript/Raw/0007_Function/119_this_with_call()&apply()&bind().js b/Javascript/Raw/0007_Function/119_this_with_call()&apply()&bind().js index b955c1cd..58befc58 100644 --- a/Javascript/Raw/0007_Function/119_this_with_call()&apply()&bind().js +++ b/Javascript/Raw/0007_Function/119_this_with_call()&apply()&bind().js @@ -54,7 +54,7 @@ const person2 = new Person("Sakib", 23); console.log(person2); -// window binding, autometicall bind to the brower window or nodejs global object +// window binding, autometicall bind to the browser window or nodejs global object // leads to undefined, to avoid such behaviour use strict mode. const printName = function () { console.log(this.name); diff --git a/Javascript/Raw/0007_Function/120_Closure.js b/Javascript/Raw/0007_Function/120_Closure.js index db8b0583..eaf96d62 100644 --- a/Javascript/Raw/0007_Function/120_Closure.js +++ b/Javascript/Raw/0007_Function/120_Closure.js @@ -23,7 +23,7 @@ function getA(a) { } const myFunc = getA(10); -// even the getA() function execution reaches the end, the inner function still has acecess to the +// even the getA() function execution reaches the end, the inner function still has access to the // variable myFunc(20); @@ -33,7 +33,7 @@ myFunc(20); // another example function count() { - // because of closure this counter variable will retain after finish this funciton execution + // because of closure this counter variable will retain after finish this function execution let counter = 0; function increment() { counter ++; diff --git a/Javascript/Raw/0007_Function/121_currying/121_currying.js b/Javascript/Raw/0007_Function/121_currying/121_currying.js index 3f6c68b1..fae1e438 100644 --- a/Javascript/Raw/0007_Function/121_currying/121_currying.js +++ b/Javascript/Raw/0007_Function/121_currying/121_currying.js @@ -1,10 +1,10 @@ // currying is a programming style or paradigm // It is used to reduce the parameters of a function -// Currying object is to reduce paramters at least as possible or even reduced into one parameter is best by +// Currying object is to reduce parameters at least as possible or even reduced into one parameter is best by // dividing one function into many and return from there. -// normall function +// normal function function foo (a, b, c) { return a + b + c; } @@ -46,7 +46,7 @@ function vat2(tax) { } } -const taxRate = vat2(.1); // look this one is parital function, beacuse here we use partial portion of the total function +const taxRate = vat2(.1); // look this one is partial function, because here we use partial portion of the total function const v4 = taxRate(100); const v5 = taxRate(200); const v6 = taxRate(300); diff --git a/Javascript/Raw/0007_Function/121_currying/122_curry_converter.js b/Javascript/Raw/0007_Function/121_currying/122_curry_converter.js index bdf9e21c..d7a41ea1 100644 --- a/Javascript/Raw/0007_Function/121_currying/122_curry_converter.js +++ b/Javascript/Raw/0007_Function/121_currying/122_curry_converter.js @@ -1,6 +1,6 @@ import _ from 'lodash'; -// custome implementation of curry converter +// custom implementation of curry converter function currying (foo) { return function curried(...args) { if(args.length >= foo.length) { @@ -8,8 +8,8 @@ function currying (foo) { return foo.apply(this, args); } else { return function (...args2) { - // here recursively we call the curried function to match the first requirment to call the given function. - // also in currying we divide the arguments which in normall function call at once. + // here recursively we call the curried function to match the first requirement to call the given function. + // also in currying we divide the arguments which in normal function call at once. // so here in recursive call we concate those arguments using concat. return curried.apply(this, args.concat(args2)); } diff --git a/Javascript/Raw/0007_switch.js b/Javascript/Raw/0007_switch.js index 47cdbdd6..d90c757a 100644 --- a/Javascript/Raw/0007_switch.js +++ b/Javascript/Raw/0007_switch.js @@ -1,12 +1,12 @@ -// I have found that switch statement doesn't mess up the numerical 1 and string 1 as true, like == (normal comparision) operator. +// I have found that switch statement doesn't mess up the numerical 1 and string 1 as true, like == (normal comparison) operator. var list = [1, 2, 4, 5, 6]; var num = 1; // if we do // var num = "1"; -// it will go to the defaule case. -// remember switch use strict comparison. 1 & "1" is different in switch comparision. +// it will go to the default case. +// remember switch use strict comparison. 1 & "1" is different in switch comparison. switch(num){ diff --git a/Javascript/Raw/0008_Module/0001C_export(default).js b/Javascript/Raw/0008_Module/0001C_export(default).js index 844c5263..289ea534 100644 --- a/Javascript/Raw/0008_Module/0001C_export(default).js +++ b/Javascript/Raw/0008_Module/0001C_export(default).js @@ -2,7 +2,7 @@ // default export is shorthand form // come handy when we use anonymous function -// only one defaule export could be in one module +// only one default export could be in one module // default export could be named or anonymous function // const pi = 3.1416; diff --git a/Javascript/Raw/0008_Module/0005_alias_import.js b/Javascript/Raw/0008_Module/0005_alias_import.js index 39aba2a1..31f95cfa 100644 --- a/Javascript/Raw/0008_Module/0005_alias_import.js +++ b/Javascript/Raw/0008_Module/0005_alias_import.js @@ -1,6 +1,6 @@ // we can rename in time of import. import {addition as add, sub as subtraction, stu as student} from "./script.js"; -import * as calculation from "./script.js" // carefull, this statement may leads to error +import * as calculation from "./script.js" // careful, this statement may leads to error // we can also rename in time of export. diff --git a/Javascript/Raw/0010_conversion.js b/Javascript/Raw/0010_conversion.js index f2c912f8..b425073c 100644 --- a/Javascript/Raw/0010_conversion.js +++ b/Javascript/Raw/0010_conversion.js @@ -30,7 +30,7 @@ let afterPrecision = precision.toPrecision(3); console.log(afterPrecision); -// JS toString() method can take radix as argument and covert to that base form +// JS toString() method can take radix as argument and convert to that base form // radix must be up to 32, like 2 for binary, 8 for octal, // toString(2) for convert to binary. diff --git a/Javascript/Raw/0011_error.js b/Javascript/Raw/0011_error.js index 7c5b61e6..1a6793bf 100644 --- a/Javascript/Raw/0011_error.js +++ b/Javascript/Raw/0011_error.js @@ -3,5 +3,5 @@ try{ }catch(err){ console.log(err); }finally{ - console.log("This codeblock excuted always"); + console.log("This codeblock executed always"); } diff --git a/Javascript/Raw/0012_this.js b/Javascript/Raw/0012_this.js index a995c946..82af989a 100644 --- a/Javascript/Raw/0012_this.js +++ b/Javascript/Raw/0012_this.js @@ -10,7 +10,7 @@ const Person = { lastName: "Samin", age : 23, myFunction: function(){ - // here this wil return the "Person" object. + // here this will return the "Person" object. return this; } } diff --git a/Javascript/Raw/0015_Destructuring_assignment.js b/Javascript/Raw/0015_Destructuring_assignment.js index 9b1c627d..40432da2 100644 --- a/Javascript/Raw/0015_Destructuring_assignment.js +++ b/Javascript/Raw/0015_Destructuring_assignment.js @@ -1,4 +1,4 @@ -// Destructuring assignment is assigning multple values at same time from array elements, function or others as well. +// Destructuring assignment is assigning multiple values at same time from array elements, function or others as well. // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment @@ -19,7 +19,7 @@ console.log(d); -// unpacking from object requres same of object variable as assigning variable, otherwise through an error. +// unpacking from object requires same of object variable as assigning variable, otherwise through an error. const person1 = { name: "Hasan", age: 24 @@ -109,7 +109,7 @@ const weather = { -// exclusivly unpacking +// exclusively unpacking const weatherReport1 = weatherInfo => { const {maxTemp: max, minTemp: min} = weatherInfo; console.log(`Temperature = max: ${max}, min: ${min}`); diff --git a/Javascript/Raw/0016_and(&&)_or(||)_operator.js b/Javascript/Raw/0016_and(&&)_or(||)_operator.js index f7cfa1c7..f9b951f6 100644 --- a/Javascript/Raw/0016_and(&&)_or(||)_operator.js +++ b/Javascript/Raw/0016_and(&&)_or(||)_operator.js @@ -6,7 +6,7 @@ var goodMood = true; if(goodSleep && goodMood){ - console.log("The day is awsome"); + console.log("The day is awesome"); }else{ console.log("Seems like a bad day"); } diff --git a/Javascript/Raw/3333_Scope/1111_local_vs_global_scope.js b/Javascript/Raw/3333_Scope/1111_local_vs_global_scope.js index 9cb4cff6..94cba108 100644 --- a/Javascript/Raw/3333_Scope/1111_local_vs_global_scope.js +++ b/Javascript/Raw/3333_Scope/1111_local_vs_global_scope.js @@ -1,6 +1,6 @@ // https://www.coursera.org/learn/javascript-basics/lecture/QRcIS/scope-in-javascript -// javscript global variable visible to everwhere, where local variable belongs to local function. +// javscript global variable visible to everywhere, where local variable belongs to local function. // they are only visible to that function. // if we comment this global variable x and try to use it to see that there is a variable with same name inside @@ -9,7 +9,7 @@ var x = 10; function func() { var x = 12; - // Carefull !!! local variabe without var become global varibale + // Careful !!! local variable without var become global variable y = 20; console.log(`Local x: ${x}`); } diff --git a/Javascript/Raw/3333_Scope/1113_strict_mode.js b/Javascript/Raw/3333_Scope/1113_strict_mode.js index 297f6d8c..f686c2d7 100644 --- a/Javascript/Raw/3333_Scope/1113_strict_mode.js +++ b/Javascript/Raw/3333_Scope/1113_strict_mode.js @@ -3,7 +3,7 @@ // strict mode convert javascript silent error to throw error // in strict mode, if you forget to use "var" or "let" means the type of the variable -// in times of declearation of a variable, this will throw error immediatly. +// in times of declearation of a variable, this will throw error immediately. // The "use strict" directive is only recognized at the beginning of a script or a function. diff --git a/Javascript/Raw/3333_Scope/1115_const.js b/Javascript/Raw/3333_Scope/1115_const.js index 986c06fc..30780e0e 100644 --- a/Javascript/Raw/3333_Scope/1115_const.js +++ b/Javascript/Raw/3333_Scope/1115_const.js @@ -2,7 +2,7 @@ // also we can't reassign the value again. -// declear variable with "const", we have to assign the value immediatly there. +// declear variable with "const", we have to assign the value immediately there. const x = 10; // we can't do this with "const" diff --git a/Javascript/Raw/3333_Scope/1117A_var_let_const.js b/Javascript/Raw/3333_Scope/1117A_var_let_const.js index 23fa8ca4..5354ec05 100644 --- a/Javascript/Raw/3333_Scope/1117A_var_let_const.js +++ b/Javascript/Raw/3333_Scope/1117A_var_let_const.js @@ -1,5 +1,5 @@ // var has function scope, if we decleared it any global object like window object for browser -// then it would avaiable to the all functions or statement below it. +// then it would available to the all functions or statement below it. // declear a variable with "var", can have access to all of the code below it. @@ -38,7 +38,7 @@ if(true) { let b = 120; console.log(b); } -// console.log(b); // this will leads to error, because it doens't have access to the "let" variable which is block scope +// console.log(b); // this will leads to error, because it doesn't have access to the "let" variable which is block scope @@ -51,7 +51,7 @@ if(true) { -// declear variable with "const", we have to assign the value immediatly there. +// declear variable with "const", we have to assign the value immediately there. // also we can't reassign the value again. const d = 10; d = 20; // this leads to error diff --git a/Javascript/Raw/3333_Scope/1117_hoisting.js b/Javascript/Raw/3333_Scope/1117_hoisting.js index 1b397b23..d4358c9a 100644 --- a/Javascript/Raw/3333_Scope/1117_hoisting.js +++ b/Javascript/Raw/3333_Scope/1117_hoisting.js @@ -24,7 +24,7 @@ -// decleration hoisting +// declaration hoisting console.log(a); // this line will print "undefined"; var a; a = 1; @@ -67,7 +67,7 @@ console.log(c) let viachle1 = 'car'; let viachle2 = 'bus'; // as let is block scope so it won't hoist outside it block, that why it's doesn't make -// that "var" decleared varibale type unpredictable behaviour. +// that "var" decleared variable type unpredictable behaviour. function chooseViachle() { if (!viachle1) { // let viachle1; // let will hoist here @@ -80,7 +80,7 @@ console.log(chooseViachle()); // here because of hoisting normally we expect to print the value undefined, we get -// actullay "Science" +// actually "Science" // because of hoisting that "subject" variable hoist to the top of the function, so when in execution phase // js found "subject = Science" it just set the variable value, not making that variable global. function foo() { diff --git a/Javascript/Raw/3334_Primitive_vs_Reference/001_primitive_vs_reference.js b/Javascript/Raw/3334_Primitive_vs_Reference/001_primitive_vs_reference.js index 4851c3cd..947e30d5 100644 --- a/Javascript/Raw/3334_Primitive_vs_Reference/001_primitive_vs_reference.js +++ b/Javascript/Raw/3334_Primitive_vs_Reference/001_primitive_vs_reference.js @@ -28,8 +28,8 @@ console.log(b); // if we copy a reference variable to other variable. // in case of reference variable changing one variable make change the other variable as well. // when we copy another reference variable to other, another pointer created in stack for that copied variable. -// but that pointer points to the same memory location in the heap where the first variable actullay points to. -// thats why in case of reference variable changing one variable make change the other variable as well. +// but that pointer points to the same memory location in the heap where the first variable actually points to. +// that's why in case of reference variable changing one variable make change the other variable as well. let obj1 = { count : 1, }; @@ -50,7 +50,7 @@ console.log(arr1, arr2); // as we see that making change to the reference variable also reflect to the other's we copy variable. -// but there is differnce between assignment(=) and mutatation(.) between variable. +// but there is difference between assignment(=) and mutatation(.) between variable. let person = { name: "Sakib", age: 35, diff --git a/Javascript/Raw/3334_Primitive_vs_Reference/004_array_deep_copy.js b/Javascript/Raw/3334_Primitive_vs_Reference/004_array_deep_copy.js index ad9fd282..74148559 100644 --- a/Javascript/Raw/3334_Primitive_vs_Reference/004_array_deep_copy.js +++ b/Javascript/Raw/3334_Primitive_vs_Reference/004_array_deep_copy.js @@ -22,7 +22,7 @@ console.log(res1); // [1, 2, 200, 4, 5] // so, to avoid shallow copy, we need deep copy means we have to create a new array which have -// complete seprate memory location, any change to new array doesn't reflect to the old array, +// complete separate memory location, any change to new array doesn't reflect to the old array, // one of the method to do deep copy by spreading operator. const arr2 = [1, 2, 3, 4, 5]; diff --git a/Javascript/Raw/3334_Primitive_vs_Reference/005_object_deep_copy.js b/Javascript/Raw/3334_Primitive_vs_Reference/005_object_deep_copy.js index b3f68773..eaf470c2 100644 --- a/Javascript/Raw/3334_Primitive_vs_Reference/005_object_deep_copy.js +++ b/Javascript/Raw/3334_Primitive_vs_Reference/005_object_deep_copy.js @@ -46,10 +46,10 @@ typeof (obj2) === 'object' ? console.log(obj2) : ''; import _ from 'lodash'; let objA = { - indentity: "person", - catagory: 'student', + identity: "person", + category: 'student', display : function () { - console.log(`${this.indentity}, ${this.catagory}`); + console.log(`${this.identity}, ${this.category}`); } }; diff --git a/Javascript/RegEx/0003_ignore_flag.js b/Javascript/RegEx/0003_ignore_flag.js index 83281f4f..6d7171e4 100644 --- a/Javascript/RegEx/0003_ignore_flag.js +++ b/Javascript/RegEx/0003_ignore_flag.js @@ -1,6 +1,6 @@ // https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/regular-expressions/ignore-case-while-matching const string = "How are you doing?"; -// i refer to ignore flag, it will match despite any case sensivity. +// i refer to ignore flag, it will match despite any case sensitivity. const regEx = /DoIng/i; console.log(regEx.test(string)); diff --git a/Javascript/RegEx/0004_match().js b/Javascript/RegEx/0004_match().js index a0618f2e..75fc58c4 100644 --- a/Javascript/RegEx/0004_match().js +++ b/Javascript/RegEx/0004_match().js @@ -2,5 +2,5 @@ const string = "United International University"; const regEx = /University/; console.log(string.match(regEx)); -// it will return the "string" which exacly match the regular expression +// it will return the "string" which exactly match the regular expression console.log(string.search(regEx)[0]); diff --git a/Javascript/RegEx/0007_character_classes.js b/Javascript/RegEx/0007_character_classes.js index 7576e4ab..8b2f796e 100644 --- a/Javascript/RegEx/0007_character_classes.js +++ b/Javascript/RegEx/0007_character_classes.js @@ -3,7 +3,7 @@ const string1 = "Hello Hollo Hullo Hallo Hillo"; // character class let you to define a group of characters where we can match single character with multiple possibilities. // It will be matched if a character matched from the group of characters. -// Like in between "H" and "llo" it will matched if any chatacter would be e, o and u. +// Like in between "H" and "llo" it will matched if any character would be e, o and u. // to define character class we have to use square brackets []. diff --git a/Javascript/RegEx/0009_negated character sets.js b/Javascript/RegEx/0009_negated character sets.js index 4473bd84..3314d542 100644 --- a/Javascript/RegEx/0009_negated character sets.js +++ b/Javascript/RegEx/0009_negated character sets.js @@ -1,5 +1,5 @@ -// ***One important things to remeber to use carat (^) as negated character we have to use square bracket and use that carat symbol -// inside the square bracket[], otherwise it will be use as match at begining of the string regEx. +// ***One important things to remember to use carat (^) as negated character we have to use square bracket and use that carat symbol +// inside the square bracket[], otherwise it will be use as match at beginning of the string regEx. // link: https://github.com/SazinSamin/Samin_Reading_Room/blob/main/Javascript/RegEx/0013_match_at_begining.js @@ -19,7 +19,7 @@ console.log(result); // excluding a single character. -const string1 = "United International Univesity"; +const string1 = "United International University"; const regEx = /[^n]/gi; const result = string1.match(regEx); console.log(result); diff --git a/Javascript/RegEx/0013_match_at_begining.js b/Javascript/RegEx/0013_match_at_begining.js index 73f4ba53..89cf3a10 100644 --- a/Javascript/RegEx/0013_match_at_begining.js +++ b/Javascript/RegEx/0013_match_at_begining.js @@ -1,4 +1,4 @@ -// *** carefull, carat also used for negated character set +// *** careful, carat also used for negated character set // link: https://github.com/SazinSamin/Samin_Reading_Room/blob/main/Javascript/RegEx/0009_negated%20character%20sets.js @@ -6,7 +6,7 @@ // if the match is not in the beginning of the string, the match will fail or test will return false. -const string1 = "United International Univesity"; +const string1 = "United International University"; const regEx = /^United/gi; const result = string1.match(regEx); console.log(result); diff --git a/Javascript/RegEx/0015_shortcuts.js b/Javascript/RegEx/0015_shortcuts.js index 95b849c2..bdc037dd 100644 --- a/Javascript/RegEx/0015_shortcuts.js +++ b/Javascript/RegEx/0015_shortcuts.js @@ -11,7 +11,7 @@ console.log(result); // the shortcut of [^A-Za-z0-9_] is \W. notice that here we have (^) negate character which -// exludes the given character in regEx. +// excludes the given character in regEx. // also W is in capital letter. const regExN = /\W/g; const resultN = string1.match(regExN); diff --git a/Javascript/RegEx/0017_Quantity_Specifier.js b/Javascript/RegEx/0017_Quantity_Specifier.js index 73a7e21d..d4b94df1 100644 --- a/Javascript/RegEx/0017_Quantity_Specifier.js +++ b/Javascript/RegEx/0017_Quantity_Specifier.js @@ -3,7 +3,7 @@ // we can set the upper and lower bound of the number of matches too. // Like we have an array named array, here the Telo have different numbers of ll. // ranging from 1 to 6. but in regEx we have specified that givent those Telo whose have -// 3 to 5 l. So, the 3,4,5 elements of array word statisfy the condition and return the word +// 3 to 5 l. So, the 3,4,5 elements of array word satisfy the condition and return the word // back but the other failed, return null. // use curly braces {} and put the upper & lower limit inside that for Quantity Specifier. diff --git a/Javascript/Silly/005_greaterThan_automatic_covert_datatype.js b/Javascript/Silly/005_greaterThan_automatic_covert_datatype.js index 2364b640..f16991c2 100644 --- a/Javascript/Silly/005_greaterThan_automatic_covert_datatype.js +++ b/Javascript/Silly/005_greaterThan_automatic_covert_datatype.js @@ -1,4 +1,4 @@ -// be carefull like the equality operator, the greater than operator will convert data types of values while comparing. +// be careful like the equality operator, the greater than operator will convert data types of values while comparing. // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Greater_than_or_equal diff --git a/Linux/Bash/002_RegEx(search_config_pipes).txt b/Linux/Bash/002_RegEx(search_config_pipes).txt index 0fc49ff2..0998e3a8 100644 --- a/Linux/Bash/002_RegEx(search_config_pipes).txt +++ b/Linux/Bash/002_RegEx(search_config_pipes).txt @@ -1,6 +1,6 @@ . apropos editor = search for command -. ls s* = match names of files that start with alphabet "s" & then followd by zero or more any characters. +. ls s* = match names of files that start with alphabet "s" & then followed by zero or more any characters. . ls *.txt = match names of files that start with zero or more any characters then ends with ".txt" . ls *lab* = match names of files that start with zero or more any characters then "lab" then again end with zero or more of any characters. @@ -12,15 +12,15 @@ . egrep -i "A" large.tx = match the range of character set with case insensitive( match both uppercase and lowercase) . egrep -n 'ganj' districts.txt = showing the number of line where match. -. egrep "L" districts.txt large.txt = match in multple files. +. egrep "L" districts.txt large.txt = match in multiple files. . egrep 'p.r' districts.txt = search for p then any character then r .(here (.) is period which represent any character) -. egrep 's+or' districts.txt = search for one or more of preceeding character "s" then "or". (+ means one or more of preceeding character) -. egrep 's*or' districts.txt = search for zero or more of preceeding character "s then "or". (* means zero or more of preceeding character) -. egrep 's{2}' districts.txt = search for number of occurance of preceeding character. -. egrep 's{2, 3}, districts.txt = serach for number of occurance between 2 and 3. -. egrep '(na){2}' districts.txt = serach for number of occurance of a group of preceeding charaters. -. egrep '(i.{2}){3}' districts.txt = serach for i then preceeding any character of 2, this group appear 3 times. +. egrep 's+or' districts.txt = search for one or more of preceding character "s" then "or". (+ means one or more of preceding character) +. egrep 's*or' districts.txt = search for zero or more of preceding character "s then "or". (* means zero or more of preceding character) +. egrep 's{2}' districts.txt = search for number of occurrence of preceding character. +. egrep 's{2, 3}, districts.txt = search for number of occurrence between 2 and 3. +. egrep '(na){2}' districts.txt = search for number of occurrence of a group of preceding characters. +. egrep '(i.{2}){3}' districts.txt = search for i then preceding any character of 2, this group appear 3 times. @@ -33,7 +33,7 @@ . egrep -v "\w" small.txt = invert match(return those lines aren't match -. egrep "[aeiou]" large.txt = matches the characeter set (any match to a,e,i,o,u) +. egrep "[aeiou]" large.txt = matches the character set (any match to a,e,i,o,u) . egrep "[^aeiou]" large.txt = complement matches the character set (match any except those character a,e,i,o,u) . egrep "[a-f]" large.txt = match the range of character set( from a to f) . egrep "[A-F]" large.txt = match the range of character set( from A to F) @@ -44,13 +44,13 @@ . egrep '\+' small.txt = match to any metacharacter ( \ use here for find the metacharacters(ex: + - . /)) . egrep '^J' districts.txt = match the word start with specifiq character(J here the first character) -. egrep '^(Ja)' districts.txt = match begining group of characters +. egrep '^(Ja)' districts.txt = match beginning group of characters . egrep '^[JG]' districts.txt = match begingin set of characters . egrep 'ganj|pur' districts.txt = match either 'ganj' or 'pur' ( | is pipe metacharacter)(this is also multiple search) -. egrep '^M|^j$' districts.txt = multiple serach at once using pipe +. egrep '^M|^j$' districts.txt = multiple search at once using pipe -. egrep "^[AEIOU]{1}.+[aeiou]{1}$" states.txt = serach for a word start and end with vowel +. egrep "^[AEIOU]{1}.+[aeiou]{1}$" states.txt = search for a word start and end with vowel . find . -name 'Javascript' = find a folder name "Javascript" diff --git a/Linux/Bash/Miscellaneous_1.txt b/Linux/Bash/Miscellaneous_1.txt index 95e4a7ad..c241fea0 100644 --- a/Linux/Bash/Miscellaneous_1.txt +++ b/Linux/Bash/Miscellaneous_1.txt @@ -34,7 +34,7 @@ . ls -la -> show the file's details also with hidden file[start with . consider hidden in unix] . pgrep -lf ml -> find specific process by name[ “ml” is a example process name] . sudo apt install -f [install dependency for any software] -. lsmod -> to see all loaded dirver +. lsmod -> to see all loaded driver . top -> display all running processes, uptime, freemem, avg load and others . uptime -> display uptime and avg load . nproc -> numbers of core in cpu diff --git a/Linux/Bash/Miscellaneous_2.txt b/Linux/Bash/Miscellaneous_2.txt index 0866e20f..54db69fa 100644 --- a/Linux/Bash/Miscellaneous_2.txt +++ b/Linux/Bash/Miscellaneous_2.txt @@ -8,7 +8,7 @@ ls *txt -> list those file whose have the .txt extension ls -d */ -> list the directory only -sudo apt -f install -> resolve all the mission dependeny for any installation +sudo apt -f install -> resolve all the mission dependency for any installation ./ -> run a file diff --git a/Linux/kernal_revert.txt b/Linux/kernal_revert.txt index 3d33a81a..06e220a1 100644 --- a/Linux/kernal_revert.txt +++ b/Linux/kernal_revert.txt @@ -2,7 +2,7 @@ To revert kernel in Ubuntu. 1. Enter to BIOS, if BIOS then press & hold shift, if UEFI then press & hold esc. 2. It will enter to the GRUB image. 3. Enter to the advance option -4. Select kernal for booting. +4. Select kernel for booting. @@ -12,4 +12,4 @@ Asus Vivobook s15 3. Back from the UEFI 4. GRUB image will load here. 5. Select advance option -6. Select kernal for booting. +6. Select kernel for booting. diff --git a/Programming paradigm/0003_Callback_function.js b/Programming paradigm/0003_Callback_function.js index 42346105..c921d4f8 100644 --- a/Programming paradigm/0003_Callback_function.js +++ b/Programming paradigm/0003_Callback_function.js @@ -7,10 +7,10 @@ function askUserName(){ return prompt("What is your name: "); } -// receive funciton as argument +// receive function as argument function greeting(username){ console.log(`Congratulation ${username()}`); } -// pass funciton as argument +// pass function as argument greeting(askUserName); diff --git a/Programming paradigm/0004_modulePatter/0001_exampleJavaScipt.js b/Programming paradigm/0004_modulePatter/0001_exampleJavaScipt.js index 3ee32b03..3e5971c2 100644 --- a/Programming paradigm/0004_modulePatter/0001_exampleJavaScipt.js +++ b/Programming paradigm/0004_modulePatter/0001_exampleJavaScipt.js @@ -1,7 +1,7 @@ // https://javascript.plainenglish.io/data-hiding-with-javascript-module-pattern-62b71520bddd -// properties & function defined inside a funciton +// properties & function defined inside a function function studentDetails(name, age, id) { // exposed properties let _name = name; @@ -15,7 +15,7 @@ function studentDetails(name, age, id) { return (_cgpa > 3.00) ? "Good" : "Not good"; } - // we exposing our desired properties by return from the funciton, + // we exposing our desired properties by return from the function, return { name: _name, age: _age, diff --git a/Programming paradigm/Functional_Programming/0001_First_Class_function.js b/Programming paradigm/Functional_Programming/0001_First_Class_function.js index 99ff6ea6..7c90c599 100644 --- a/Programming paradigm/Functional_Programming/0001_First_Class_function.js +++ b/Programming paradigm/Functional_Programming/0001_First_Class_function.js @@ -1,6 +1,6 @@ // First class functions are functions that are treated like an object(or are assignable to a variable). // https://developer.mozilla.org/en-US/docs/Glossary/First-class_Function -// diffrence between first class function & higher order funciton +// difference between first class function & higher order function // https://stackoverflow.com/questions/10141124/any-difference-between-first-class-function-and-high-order-function // First Class functions can: diff --git a/Programming paradigm/Functional_Programming/0002_Higher_Order_Function.js b/Programming paradigm/Functional_Programming/0002_Higher_Order_Function.js index de0ef2a7..b8124008 100644 --- a/Programming paradigm/Functional_Programming/0002_Higher_Order_Function.js +++ b/Programming paradigm/Functional_Programming/0002_Higher_Order_Function.js @@ -1,5 +1,5 @@ // https://medium.com/javascript-scene/higher-order-functions-composing-software-5365cf2cbe99 -// diffrence between first class function and higher order funciton +// difference between first class function and higher order function // https://stackoverflow.com/questions/10141124/any-difference-between-first-class-function-and-high-order-function diff --git a/Programming paradigm/Imperative_vs_Declearative.js b/Programming paradigm/Imperative_vs_Declearative.js index a88dcb93..29493adf 100644 --- a/Programming paradigm/Imperative_vs_Declearative.js +++ b/Programming paradigm/Imperative_vs_Declearative.js @@ -51,7 +51,7 @@ function vat2(tax) { } } -const taxRate = vat2(.1); // look this one is parital function, beacuse here we use partial portion of the total function +const taxRate = vat2(.1); // look this one is partial function, because here we use partial portion of the total function const v4 = taxRate(100); const v5 = taxRate(200); const v6 = taxRate(300); diff --git a/Programming paradigm/Partially_Applied_function.js b/Programming paradigm/Partially_Applied_function.js index efcec3d2..91baf27e 100644 --- a/Programming paradigm/Partially_Applied_function.js +++ b/Programming paradigm/Partially_Applied_function.js @@ -11,7 +11,7 @@ function urlBuilder(scheme) { } } -// Here this below line is an exmple of partial function, beccause here we actullay first use the partial +// Here this below line is an example of partial function, because here we actually first use the partial // of our urlBuilder function with one arguments, which return another function which will take another argument. // So, we didn't pass the all arguments need to complete the function at once. const schemed = urlBuilder('http'); diff --git a/Python/Basic/00011_print.py b/Python/Basic/00011_print.py index fb19d4c8..0ebcae6f 100644 --- a/Python/Basic/00011_print.py +++ b/Python/Basic/00011_print.py @@ -4,6 +4,6 @@ b = 'Tofajjel' c = 'Hossain' -# sep for sperater between the print contens. +# sep for sperater between the print contents. # end for how the line ends with print(a, b, c, sep = '_', end = '##') diff --git a/Python/Basic/0006_for_loop.py b/Python/Basic/0006_for_loop.py index 3b28f020..feaf29ef 100644 --- a/Python/Basic/0006_for_loop.py +++ b/Python/Basic/0006_for_loop.py @@ -1,8 +1,8 @@ # if we give 1 parameter to the range function it will iterate to that parameter, incrementing by 1. -# if we give 2 paramter it will start from that parameter, to another parameter, incrementing by 1. -# if we give 3 paramter it will incrementing the value by that paramter. +# if we give 2 parameter it will start from that parameter, to another parameter, incrementing by 1. +# if we give 3 parameter it will incrementing the value by that parameter. -# in default range funciton start from 0, end just before the number of second argument. +# in default range function start from 0, end just before the number of second argument. for i in range(2, 20): diff --git a/Python/Basic/function.py b/Python/Basic/function.py index e96949b0..46fcc8b4 100644 --- a/Python/Basic/function.py +++ b/Python/Basic/function.py @@ -1,9 +1,9 @@ # define function with "def" keyword, then function name. # after function name use parenthesis for arguments. -# intendation is consider the body of the function. After the :(colon), the funciton body get started +# intendation is consider the body of the function. After the :(colon), the function body get started # and we have to give a right intendation to tell python that this lines or code inside the function. -# the indendation can be 2, 4, ... spaces, but must be consistance. +# the indentation can be 2, 4, ... spaces, but must be consistance. # Where the intendation get off, the function body close. # python can also return multiple values. @@ -11,7 +11,7 @@ def add_10(a, b): return a + 10, b + 10; -# use multiple values to catch mutiple returned values. +# use multiple values to catch multiple returned values. a1, a2 = add_10(10, 20); print(a1); print(a2); diff --git a/Python/Basic/type_conversion.py b/Python/Basic/type_conversion.py index 11c0f4b1..761001ef 100644 --- a/Python/Basic/type_conversion.py +++ b/Python/Basic/type_conversion.py @@ -4,8 +4,8 @@ a = 10 b = 20.20 -# implicit data type convertion, -# here the interger type 10 convert to float, then a & b add together. +# implicit data type conversion, +# here the integer type 10 convert to float, then a & b add together. # implicit conversion done by python interpreter when there is no chance of data loss. c = a + b diff --git a/Security/Cryptography/Hash/README.md b/Security/Cryptography/Hash/README.md index 6d53e299..deeabd95 100644 --- a/Security/Cryptography/Hash/README.md +++ b/Security/Cryptography/Hash/README.md @@ -1,6 +1,6 @@ # Hash - The result of a hash function called message digest. -#### MD5 hash in teminal +#### MD5 hash in terminal - md5sum <<<"Your text" - sha256sum <<< hey,there @@ -11,6 +11,6 @@ #### [Message authentication code](https://en.wikipedia.org/wiki/Message_authentication_code) #### [HMAC](https://en.wikipedia.org/wiki/HMAC) -#### Hashing also very important for distributed caching service which like consistant hashing +#### Hashing also very important for distributed caching service which like consistent hashing - https://www.shafaetsplanet.com/?p=3831 - https://www.youtube.com/watch?v=iuqZvajTOyA diff --git a/Server/ejs/0005_layout/views/footer.ejs b/Server/ejs/0005_layout/views/footer.ejs index 78ec5e41..21390fb4 100644 --- a/Server/ejs/0005_layout/views/footer.ejs +++ b/Server/ejs/0005_layout/views/footer.ejs @@ -1,3 +1,3 @@
- 2022 All right receieved. + 2022 All right received.
\ No newline at end of file diff --git a/Technique/scanf.cpp b/Technique/scanf.cpp index 98163745..9f060280 100644 --- a/Technique/scanf.cpp +++ b/Technique/scanf.cpp @@ -3,7 +3,7 @@ //how much input you take -//*********** I have got a problem here, if we enter 2 elements, it does't stop taking input. +//*********** I have got a problem here, if we enter 2 elements, it doesn't stop taking input. #include diff --git a/Technique/scanf_with_format.c b/Technique/scanf_with_format.c index 3495662f..2d1ccab6 100644 --- a/Technique/scanf_with_format.c +++ b/Technique/scanf_with_format.c @@ -6,7 +6,7 @@ int main(){ //scanf can take as format you like to take input. //In this code we take input of a ip address like 192.168.0.1 - //The section of the ip seperated by "."(dot). + //The section of the ip separated by "."(dot). //So scanf will ignore that //And each integer value to it's corresponding variable. diff --git a/link.txt b/link.txt index f620b7f0..89a245e1 100644 --- a/link.txt +++ b/link.txt @@ -10,7 +10,7 @@ https://github.com/jigar-sable/Portfolio-Website Web Dev: Node js: Learn with Sumit - LWS - Bangladesh - Font awsome + Font awesome how to add font awesome in html Api: