Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Articles on Trending Technologies
Technical articles with clear explanations and examples
How to create a responsive checkout form with CSS?
A checkout form is essential for e-commerce websites where customers complete their purchases. It displays product details, billing information, payment fields, and order totals in a user-friendly layout. Creating a responsive checkout form ensures it works seamlessly across all devices. Syntax .checkout-form { display: flex; flex-wrap: wrap; justify-content: space-between; } @media (max-width: 800px) { .checkout-form { flex-direction: column; } } Setting Up Flexbox Layout The ...
Read MoreC Program to Find if there is any subarray with a sum equal to 0
A subarray is a contiguous part of the array. The sum of elements in a subarray is the cumulative sum of elements of a subarray. For example: in the given array [1, 2, 3, 4, 5, 6] the subarray is [3, 4, 5]. In this article, we are given an array and need to find if any subarray has a sum equal to zero using C. Problem Statement Example 1 Input: arr[] = {4, 2, -3, 1} Output: Yes Explanation: The subarray {2, -3, 1} has a sum equal to 0. Example ...
Read MoreHow to create a signup form with HTML and CSS?
In this article, we will be understanding How to create a signup form with HTML and CSS. A sign-up form allows any new user visiting the website to register. It includes adding an email-id, password, repeat password, and clicking on the Sign-Up button to register. To allow the browser to save the password, click the Remember Me. You can also provide a Terms & Policies link so the users can first read the registration terms. Let us see how to create a signup form with HTML and CSS. Steps to Create Sign Up Form We are following ...
Read MoreProgram to Rotate a matrix by 90 degrees in the clockwise direction in C
In this article, we are given an N x N matrix, and our task is to rotate it by 90 degrees clockwise in C. Syntax void rotateMatrix(int matrix[N][N]); // For brute force approach void rotateMatrixInPlace(int matrix[N][N]); // For in-place rotation approach Example Input: [1 2 3], [4 5 6], [7 8 9] Output: [7 4 1], [8 5 2], [9 6 3] Below are different approaches to rotate a matrix by 90 degrees in the clockwise direction − Using Brute Force Approach ...
Read MoreC program to Implement Kadane’s Algorithm
We are given an array of integers, and we need to find the maximum sum of a contiguous subarray using Kadane's Algorithm. Kadane's Algorithm is an efficient way to find the maximum subarray sum in O(n) time complexity. For example, in the array {-2, 1, -3, 4, -1, 2, 1, -5, 4}, the subarray [4, -1, 2, 1] has the maximum sum 6. What Is Kadane's Algorithm? Kadane's algorithm is a popular and optimal algorithm used to find the maximum sum of a contiguous subarray in a given array of integers. This algorithm efficiently solves the Maximum Subarray ...
Read MoreHow to create a responsive login form with CSS?
A responsive login form adapts to different screen sizes and provides an optimal user experience across all devices. This form typically includes fields for username and password, a login button, "Remember Me" checkbox, and a forgot password link. Let's create a responsive login form using CSS media queries and flexible layouts. Syntax /* Basic form styling */ form { max-width: value; margin: auto; padding: value; } /* Responsive breakpoints */ @media screen and (max-width: value) { /* Mobile styles */ ...
Read MoreC Program to Find an Automorphic Number
In C, an automorphic number is a positive integer whose square ends with the number itself. For example, 52 = 25 (ends with 5), and 252 = 625 (ends with 25). This article demonstrates how to check whether a given number is automorphic in C programming. Syntax int isAutomorphicNumber(int num); Examples of Automorphic Numbers Consider the following examples to understand automorphic numbers − 5: 52 = 25 (ends with 5) − Automorphic 25: 252 = 625 (ends with 25) − Automorphic 7: 72 = 49 (ends with 49, not 7) − Not ...
Read MoreMaximum count of characters that can replace ? by at most A 0s and B 1s with no adjacent duplicates
In this problem, we need to replace '?' characters in a string with '0's and '1's such that no two adjacent characters are the same, while maximizing the number of replacements using at most A zeros and B ones. Syntax int maximumChar(char *str, int aCount, int bCount); Problem Statement Given a string containing '*' and '?' characters, and two integers A and B representing available 0s and 1s, find the maximum number of '?' characters that can be replaced without creating adjacent duplicates. Algorithm The approach involves the following steps − ...
Read MoreHow to create a \"scroll back to top\" button with CSS?
A scroll back to top button is a common UI element that appears when users scroll down a page, allowing them to quickly return to the top. This improves user experience on long web pages. Syntax .scroll-to-top-button { position: fixed; bottom: value; right: value; display: none; } Method 1: Basic CSS-Only Approach Create a simple scroll to top button using CSS positioning and basic styling − body { ...
Read MorePosition of the leftmost set bit in a given binary string where all 1s appear at the end
The aim of this article is to implement a program to find the position of the leftmost set bit in a given binary string where all 1s appear at the end. A binary string is a sequence of bits (0s and 1s) used to represent data in binary format. In this problem, we are given a binary string where all the 1s are grouped together at the rightmost positions, and we need to find the leftmost position where the first '1' appears. Syntax int findFirstBit(char* str, int length); Problem Statement Given a binary ...
Read More