Skip to content

Commit

Permalink
Merge pull request #372 from Soumyadipgithub/main
Browse files Browse the repository at this point in the history
Fix the Footer bug completely.
  • Loading branch information
PRIYESHSINGH24 authored Jan 20, 2025
2 parents 2b92e7b + 4b0a245 commit 1ecad03
Show file tree
Hide file tree
Showing 3 changed files with 105 additions and 93 deletions.
104 changes: 104 additions & 0 deletions Algorithmic Strategies/Divide and Conquer .README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# <div align="Center">Divide and Conquer</div>
## Divide and Conquer is a problem-solving technique that breaks down a large problem into smaller, more manageable subproblems. These subproblems are solved independently and then combined to find the solution to the original problem. This approach helps in reducing complexity and improving efficiency in many algorithms. It is often used in algorithms related to sorting, searching, and multiplication.

### Example: Merge Sort
### 1. Divide the array into two halves.
### 2. Recursively sort each half.
### 3. Merge the two sorted halves to form a sorted array.
### In this case, the problem of sorting an array is divided into smaller subproblems, each of which is easier to solve.
<hr>

### For Example :
```
#include <stdio.h>
// Function to merge two halves into a sorted array
void merge(int arr[], int left, int mid, int right) {
int n1 = mid - left + 1;
int n2 = right - mid;
// Create temporary arrays
int leftArr[n1], rightArr[n2];
// Copy data to temporary arrays
for (int i = 0; i < n1; i++)
leftArr[i] = arr[left + i];
for (int j = 0; j < n2; j++)
rightArr[j] = arr[mid + 1 + j];
// Merge the temp arrays back into the original array
int i = 0, j = 0, k = left;
while (i < n1 && j < n2) {
if (leftArr[i] <= rightArr[j]) {
arr[k] = leftArr[i];
i++;
} else {
arr[k] = rightArr[j];
j++;
}
k++;
}
// Copy remaining elements of leftArr[], if any
while (i < n1) {
arr[k] = leftArr[i];
i++;
k++;
}
// Copy remaining elements of rightArr[], if any
while (j < n2) {
arr[k] = rightArr[j];
j++;
k++;
}
}
// Function to implement Merge Sort
void mergeSort(int arr[], int left, int right) {
if (left < right) {
int mid = left + (right - left) / 2; // Find the middle point
// Recursively sort the first and second halves
mergeSort(arr, left, mid);
mergeSort(arr, mid + 1, right);
// Merge the sorted halves
merge(arr, left, mid, right);
}
}
// Function to print the array
void printArray(int arr[], int size) {
for (int i = 0; i < size; i++)
printf("%d ", arr[i]);
printf("\n");
}
// Main function
int main() {
int arr[] = {38, 27, 43, 3, 9, 82, 10};
int size = sizeof(arr) / sizeof(arr[0]);
printf("Original Array: \n");
printArray(arr, size);
// Call mergeSort to sort the array
mergeSort(arr, 0, size - 1);
printf("Sorted Array: \n");
printArray(arr, size);
return 0;
}
```

### Output:
```
Original Array:
38 27 43 3 9 82 10
Sorted Array:
3 9 10 27 38 43 82
```
15 changes: 1 addition & 14 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -190,23 +190,10 @@ <h2>Codeforces</h2>
<li><a href="about.html" style="color: white; text-decoration: none; transition: all 0.3s ease;"
onmouseover="this.style.color='green'; this.style.paddingLeft='10px'"
onmouseout="this.style.color='white'; this.style.paddingLeft='0'">Who We Are</a></li>

onmouseover="this.style.color='black'; this.style.paddingLeft='10px'"
onmouseout="this.style.color='white'; this.style.paddingLeft='0'">Who We Are</a></li>



<li><a href="blog.html" style="color: white; text-decoration: none; transition: all 0.3s ease;"
onmouseover="this.style.color='green'; this.style.paddingLeft='10px'"
onmouseout="this.style.color='white'; this.style.paddingLeft='0'">Blog</a></li>
<li><a href="work.html" style="color: white; text-decoration: none; transition: all 0.3s ease;"
onmouseover="this.style.color='green'; this.style.paddingLeft='10px'"></a></li>


<li><a href="#" style="color: white; text-decoration: none; transition: all 0.3s ease;"
onmouseover="this.style.color='green'; this.style.paddingLeft='10px'"
onmouseout="this.style.color='white'; this.style.paddingLeft='0'">Blog</a></li>
<li><a href="#" style="color: white; text-decoration: none; transition: all 0.3s ease;"
onmouseover="this.style.color='green'; this.style.paddingLeft='10px'"
onmouseout="this.style.color='white'; this.style.paddingLeft='0'">Work With Us</a></li>
<li><a href="#" style="color: white; text-decoration: none; transition: all 0.3s ease;"
Expand Down Expand Up @@ -309,4 +296,4 @@ <h2>Codeforces</h2>

</body>

</html>
</html>
79 changes: 0 additions & 79 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -704,85 +704,6 @@ footer {
color: #1da1f2;
text-shadow: 0 6px 10px rgba(0, 0, 0, 0.2);
}
footer form input {
flex: 1;
padding: 10px;
font-size: 14px;
border: 1px solid #dee2e6;
border-radius: 4px;
background-color: #ffffff;
transition: all 0.4s ease;
outline: none;
position: relative;
}

footer form input:hover {
border-color: #6c757d;
background-color: #f1f1f1;
box-shadow: 0 4px 12px rgba(108, 117, 125, 0.2);
transform: translateY(-2px) scale(1.02);
}

footer form input:focus {
border-color: #495057;
background-color: #ffffff;
box-shadow: 0 6px 15px rgba(73, 80, 87, 0.3);
transform: translateY(-3px) scale(1.03);
}

footer form input:active {
border-color: #343a40;
background-color: #e9ecef;
box-shadow: 0 2px 8px rgba(52, 58, 64, 0.2);
transform: translateY(0) scale(1);
}

footer form button {
padding: 10px 20px;
font-size: 14px;
font-weight: bold;
background-color: #6c757d;
color: #ffffff;
border: none;
border-radius: 4px;
cursor: pointer;
transition: all 0.4s ease, box-shadow 0.4s ease;
position: relative;
overflow: hidden;
}

footer form button:hover {
background-color: #495057;
transform: translateY(-2px) scale(1.05);
box-shadow: 0 6px 15px rgba(73, 80, 87, 0.3);
}

footer form button:active {
background-color: #343a40;
transform: translateY(0) scale(0.98);
box-shadow: 0 2px 8px rgba(52, 58, 64, 0.2);
}

footer form button::before {
content: "";
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: rgba(255, 255, 255, 0.2);
transition: all 0.4s ease;
z-index: 1;
}

footer form button:hover::before {
left: 100%;
}

footer form button span {
position: relative;
z-index: 2;
}

.social-links a[aria-label="Instagram"]:hover {
color: #e4405f;
Expand Down

0 comments on commit 1ecad03

Please sign in to comment.