mirror of
https://github.com/TheAlgorithms/C
synced 2024-11-23 13:59:39 +03:00
chore: fix various spelling typos (#945)
This commit is contained in:
parent
b0a41bb38c
commit
889931acc8
@ -10,7 +10,7 @@
|
||||
* instead of the server only sending and the client only receiving data,
|
||||
* The server and client can both send and receive data simultaneously. This is
|
||||
* implemented by using the `fork` function call so that in the server the child
|
||||
* process can recieve data and parent process can send data, and in the client
|
||||
* process can receive data and parent process can send data, and in the client
|
||||
* the child process can send data and the parent process can receive data. It
|
||||
* runs an infinite loop and can send and receive messages indefinitely until
|
||||
* the user exits the loop. In this way, the Full Duplex Form of communication
|
||||
|
@ -10,7 +10,7 @@
|
||||
* instead of the server only sending and the client only receiving data,
|
||||
* The server and client can both send and receive data simultaneously. This is
|
||||
* implemented by using the `fork` function call so that in the server the child
|
||||
* process can recieve data and parent process can send data, and in the client
|
||||
* process can receive data and parent process can send data, and in the client
|
||||
* the child process can send data and the parent process can receive data. It
|
||||
* runs an infinite loop and can send and receive messages indefinitely until
|
||||
* the user exits the loop. In this way, the Full Duplex Form of communication
|
||||
|
@ -9,7 +9,7 @@
|
||||
* where words are separated by a space, newline, or underscore.
|
||||
* This program prints (writes or outputs) to another file (`wordcount.txt`),
|
||||
* the individual words contained in 'file.txt' with their frequencies (number
|
||||
* of occurences) each on a newline and in alphabetical order. This program uses
|
||||
* of occurrences) each on a newline and in alphabetical order. This program uses
|
||||
* the binary tree data structure to accomplish this task.
|
||||
* @author [Randy Kwalar](https://github.com/RandyKdev)
|
||||
*/
|
||||
@ -28,7 +28,7 @@
|
||||
struct Node
|
||||
{
|
||||
char *word; ///< the word (value) of the node
|
||||
uint64_t frequency; ///< number of occurences of the word
|
||||
uint64_t frequency; ///< number of occurrences of the word
|
||||
struct Node *left; ///< pointer to the left child node
|
||||
struct Node *right; ///< pointer to the right child node
|
||||
};
|
||||
|
@ -16,7 +16,7 @@ struct node *first=NULL ;
|
||||
struct node *last=NULL ;
|
||||
/* first and last are global variables and need not be passed to any function. Any changes made to variables first and last by any of the functions in the program will be reflected in the entire program */
|
||||
|
||||
/* This function is responsible for creating the Circularly Linked List right from the BEGINING. */
|
||||
/* This function is responsible for creating the Circularly Linked List right from the BEGINNING. */
|
||||
void create()
|
||||
{
|
||||
int i , n ;
|
||||
|
@ -48,7 +48,7 @@ void push(struct node *p)
|
||||
temp->link = top;
|
||||
top = temp;
|
||||
|
||||
printf("Inserted succesfully.\n");
|
||||
printf("Inserted successfully.\n");
|
||||
}
|
||||
void pop(struct node *p)
|
||||
{
|
||||
|
@ -159,7 +159,7 @@ void print_int_value(int n, int width, int precision)
|
||||
|
||||
while (n > 0) {
|
||||
*s++ = n % 10 + '0'; // Converts last digit of number to character and store it in p
|
||||
++size; // Increment size variable as one more digit is occured
|
||||
++size; // Increment size variable as one more digit is occurred
|
||||
n /= 10; // Removes the last digit from the number n as we have successfully stored it in p
|
||||
}
|
||||
*s = '\0';
|
||||
|
@ -70,7 +70,7 @@ int word_count(const char *input_text, word_count_word_t *words)
|
||||
|
||||
words->count = 0;
|
||||
|
||||
/* make sure none error is occured */
|
||||
/* make sure none error is occurred */
|
||||
if (loop)
|
||||
{
|
||||
/* collects the last word up to the \0-character. and counts it.*/
|
||||
|
@ -131,7 +131,7 @@ static inline void glutBitmapString(void *font, char *string)
|
||||
*
|
||||
* @param x array containing absicca of points (must be pre-allocated)
|
||||
* @param y array containing ordinates of points (must be pre-allocated)
|
||||
* @param N number of points in the the arrays
|
||||
* @param N number of points in the arrays
|
||||
*/
|
||||
void display_graph(const double *x, const double *y, size_t N, double l,
|
||||
double k)
|
||||
|
@ -6,7 +6,7 @@
|
||||
* \details
|
||||
* This example implements a powerful self organizing map algorithm.
|
||||
* The algorithm creates a connected network of weights that closely
|
||||
* follows the given data points. This this creates a chain of nodes that
|
||||
* follows the given data points. This creates a chain of nodes that
|
||||
* resembles the given input shape.
|
||||
* \author [Krishna Vedala](https://github.com/kvedala)
|
||||
* \see kohonen_som_topology.c
|
||||
|
@ -24,7 +24,7 @@
|
||||
*/
|
||||
uint32_t duplicateNumber(const uint32_t *in_arr, size_t n)
|
||||
{
|
||||
if (n <= 1) { // to find duplicate in an array its size should be atleast 2
|
||||
if (n <= 1) { // to find duplicate in an array its size should be at least 2
|
||||
return -1;
|
||||
}
|
||||
uint32_t tortoise = in_arr[0]; ///< variable tortoise is used for the longer
|
||||
|
@ -22,7 +22,7 @@ void countSort(int *arr, int n, int place)
|
||||
int i, freq[range] = {0};
|
||||
int *output = (int *)malloc(n * sizeof(int));
|
||||
|
||||
// Store count of occurences in freq[]
|
||||
// Store count of occurrences in freq[]
|
||||
for (i = 0; i < n; i++) freq[(arr[i] / place) % range]++;
|
||||
|
||||
// Change freq[i] so that it contains the actual position of the digit in
|
||||
|
Loading…
Reference in New Issue
Block a user