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
largest string formed by choosing words from a given Sentence as per given Pattern
To find the largest string formed by choosing words from a given sentence, a user should know about the lexicographically largest string. A lexicographically largest string is a string, when sorted alphabetically, it would appear at the last if we form all possible strings from the selected words. For example: {lion, zebra, apple} will be lexicographically sorted as {apple, lion, zebra}. In this article, we have been given a string and a pattern. Based on this pattern, we have to find the lexicographically largest string matching the given pattern by choosing words from the sentence using C. Here is ...
Read MoreHow to style block buttons (full-width) with CSS?
Block buttons, also known as full-width buttons, span the entire width of their container. They are created using CSS by setting the button's width to 100% and applying proper styling for better visual appeal and user experience. Syntax button { width: 100%; display: block; } Example: Basic Block Button The following example creates a simple full-width button − .blockBtn { display: block; ...
Read MoreHow to create \"next\" and \"previous\" buttons with CSS?
Creating "next" and "previous" buttons with CSS is a common requirement for web pages, especially for multi-page content as it enhances navigation between different pages. These buttons provide an intuitive way for users to move through content sequentially. Syntax .button { display: inline-block; padding: value; background-color: color; color: text-color; border: width style color; border-radius: value; text-decoration: none; } .button:hover { background-color: hover-color; ...
Read MoreFind the count of Alphabetic and Alphanumeric strings from given Array of Strings
In C programming, counting alphabetic and alphanumeric strings from an array involves checking each character in every string. An alphabetic string contains only letters (a-z, A-Z), while an alphanumeric string contains both letters and digits (0-9). Syntax int isAlphabetic(char str[]); int isAlphanumeric(char str[]); void countStrings(char arr[][MAX_LEN], int n); Algorithm The approach to solve this problem involves the following steps − Step 1 − Iterate through each string in the array Step 2 − Check each character to determine if string is alphabetic or alphanumeric Step 3 − Count occurrences and maintain frequency ...
Read MoreHow to create icon buttons with CSS?
To create icon buttons with CSS, you need to combine HTML button elements with icon fonts. Here, we will use Font Awesome icons to create attractive, interactive buttons with both icons and text. Syntax button { /* Basic button styling */ background-color: color; border: none; color: text-color; padding: value; cursor: pointer; } i { /* Icon styling */ padding: value; ...
Read MoreCount of sum of “10” subsequences for each 1 in string with A 1s, B 10s and C 0s
In C programming, we need to find the count of "10" subsequences for each '1' in a string that contains A individual 1s, B "10" substrings, and C individual 0s. This problem involves counting subsequences where each '1' can pair with available '0' characters. Syntax long long maximumSubSeq(int A, int B, int C); Problem Understanding Given three parameters − A − Number of standalone '1' characters B − Number of "10" substrings C − Number of standalone '0' characters We need to count all possible "10" subsequences from the concatenated string. ...
Read MoreHow to create notification buttons with CSS?
A notification button includes a separate text on the top-right i.e., a badge with the number of notifications. Notifications are like pending messages waiting to be read. Once you read, the count of the notification i.e., the pending message will decrease. We can easily create such a button look-alike with the notification's icon using HTML and CSS. Syntax .notificationContainer { position: relative; display: inline-block; } .notificationBadge { position: absolute; top: -10px; right: -10px; ...
Read MoreConvert a string Str1 to Str2 by moving B to right and A to left without crossover
The aim of this article is to implement a program to convert a string Str1 to Str2 by moving B to right and A to left without crossover. In this problem, we have two strings where characters 'A' can only move left, characters 'B' can only move right, and empty spaces are represented by '#'. The key constraint is that 'A' and 'B' characters cannot cross over each other during movement. Syntax bool moveRobots(char str1[], char str2[]); Examples Example 1 Input: str1 = "#B#A#", str2 = "##BA#" Output: Yes ...
Read MoreHow to create pill buttons with CSS?
Pill buttons are rounded, capsule-shaped buttons that provide a modern and clean appearance to web interfaces. They are created by applying a large border-radius value to regular buttons, giving them their characteristic pill-like shape. Syntax button { border-radius: value; padding: vertical horizontal; border: none; } Key Properties for Pill Buttons PropertyPurposeTypical Value border-radiusCreates rounded corners25px or higher paddingAdds internal spacing10px 20px borderRemoves default bordernone Example: Basic Pill Buttons The following example demonstrates how to create pill buttons with ...
Read MoreC Program To Write Your Own atoi()
The atoi() function in C converts a string representation of a number into an integer value. The name stands for "ASCII to Integer". While the standard library provides atoi(), implementing your own version helps understand string parsing and character-to-number conversion. Syntax int myAtoi(const char *str); Parameters str − Pointer to the null-terminated string to be converted Return Value Returns the converted integer value. If no valid conversion can be performed, it returns 0. Example 1: Basic Implementation This example shows a simple implementation that handles positive numbers − ...
Read More