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
Print numbers in the range 1 to n having bits in an alternate pattern
Alternate bit pattern implies the positioning of 0’s and 1’s in a number at an alternate position i.e. no two 0s or 1’s are together. For example, 10 in binary representation is (1010)2 which has an alternate bit pattern as 0’s and 1’s are separated by each other. Problem Statement Given an integer, N. Find all the integers in the range 1 to N where the bit pattern of the integer is alternating. Example 1 Input: 10 Output: 1, 2, 5, 10 Explanation $\mathrm{(1)_{10} = (1)_2, (2)_{10} = (10)_2, (5)_{10} = (101)_2, (10)_{10} = (1010)_2}$ Example 2 Input: ...
Read MoreJacobsthal and Jacobsthal-Lucas Numbers
Jacobsthal Numbers Lucas sequence 𝑈𝑛(𝑃, 𝑄) where P = 1 and Q = -2 are called Jacobsthal numbers. The recurrence relation for Jacobsthal numbers is, $$\mathrm{𝐽_𝑛 = 0\: 𝑓𝑜𝑟 \: 𝑛 = 0}$$ $$\mathrm{𝐽_𝑛 = 1\: 𝑓𝑜𝑟 \: 𝑛 = 1}$$ $$\mathrm{𝐽_𝑛 = 𝐽_𝑛−1 + 2𝐽_{𝑛−2}\: 𝑓𝑜𝑟 \: 𝑛 > 1}$$ Following are the Jacobsthal numbers − 0, 1, 1, 3, 5, 11, 21, 43, 85, 171, 341, 683, 1365, …. Jacobsthal-Lucas Numbers Complementary Lucas sequence $\mathrm{𝑉_𝑛(𝑃, 𝑄)}$ where P = 1 and Q = -2 are called JacobsthalLucas numbers. The recurrence relation for Jacobsthal-Lucas numbers is, $\mathrm{𝐽_𝑛}$ = ...
Read MoreIncrement a number by 1 by manipulating the bits
Bit manipulation applies logical operations on a bit stream using bitwise operators like AND(&), OR(|), NOT(~), XOR(^), Left Shift() to get a required result. Using bitwise operators is beneficial as we can manipulate individual bits and they are faster than other operators. Problem Statement Given a number. Increment or add the number by 1 using bitwise operators only. (Don’t use arithmetic operators like ‘+’ , ‘-’, ‘*’ or’/’ ) Approach 1: Using One’s Complement / NOT Operator Bitwise complement / One’s complement is implemented using the NOT(~) Operator. For a number n, a bitwise complement of n i.e. ~n = ...
Read MoreAptoide Alternatives
What is Aptoide? Aptoide is a platform that consists of a lot of applications which can be downloaded on Android devices. It can be said that Aptoide is an alternative to Google Play Store. Aptoide came into picture in 2009 which consists of applications for smartphones and tablets. An Android application which is used to access stores is used to run Aptoide. This is an open-source platform and apps included here are available for free. If you are unable to find any app on the Google Play Store, you can access Aptoide and search for it. Why Aptoide Alternatives? ...
Read MoreSum of Fourth Powers of first N natural numbers
The fourth power of a number x is x raised to the power 4 or x4. Natural numbers are all positive integers excluding zero. Thus, the sum of the fourth powers of the first N natural numbers is − $\mathrm{Sum = 1^4 + 2^4 + 3^4 + 4^4 + … + N^4}$ This article describes some approaches for finding the sum using minimum time and space complexity. Problem Statement Given the number N, find the sum $\mathrm{1^4 + 2^4 + 3^4 + 4^4 + … + N^4}$. Example 1 Input: 3 Output: 98 Explanation $\mathrm{Sum = 1^4 + ...
Read MoreCentered Pentadecagonal Number
The problem includes printing the N-th centered pentadecagonal number for any input number N. A centered pentadecagonal number is a number that can be represented in the form of a figure with a dot in the centre and surrounded by successive layers of the pentadecagon i.e. 15-sided polygon. Here the successive layers of the pentadecagon depict that the first layer surrounding the dot in the centre will be 15-sided polygon, the next layer will be 30-sided polygon followed by a 45-sided polygon and so on. We can understand the concept of centered pentadecagonal with the below figures. The first ...
Read MoreCentered Octagonal Number
The problem statement includes printing the N-th centered octagonal number for some positive integer N, which will be given by the user. A centered octagonal number is a type of number which can be represented in a pattern of figures. Every centered octagonal number can be represented as a dot in the centre surrounded by the successive layers of an Octagon. An octagon is a type of polygon in geometry which has 8 sides in it. The successive layers of an octagon means that the first layer surrounding the dot in the centre will be an octagon, the second ...
Read MoreHow to Replace All After/Before Specific Character or Space in Excel?
Excel is a robust spreadsheet programme that provides a wide range of functions to successfully modify and organise data. One frequent task is to change the text in cells based on specific parameters. In order to show you how to carry out these substitutions successfully, we will lead you through step-by-step instructions and examples throughout this lesson. We will also go through how to use these functions with dynamic formulas to handle texts of various lengths. You will have the knowledge and abilities necessary to confidently edit text in Excel at the end of this session, boosting your data processing ...
Read MoreHow to Replace Accented Characters With Regular Characters in Excel?
Diacritical marks, often known as accented characters, are frequently employed in a variety of languages to denote particular phonetic or linguistic nuances. To make data processing and analysis easier, there are times when you might need to remove certain accents and convert them to their regular counterparts. You will be given step-by-step directions on how to carry out this activity in Microsoft Excel in this tutorial. You will have a strong understanding of how to use built-in Excel functions, formulae, and other practical ways to replace accented characters with regular characters by the end of this session. So let's get ...
Read MoreHow to Replace # Formula Errors With 0, Blank or Certain Text in Excel?
You understand how annoying it may be if you've ever run into the dreaded "#" formula errors in your Excel spreadsheets. When there are problems with cell references, mathematical operations, or even data types within your calculations, these errors frequently happen. Fortunately, Excel offers numerous ways to elegantly address these mistakes, improving the presentation of your data and avoiding interruptions to your calculations. Whether you are an experienced Excel user or are just starting started, learning these error-handling strategies can improve your spreadsheet abilities and allow you to produce workbooks that are more robust and presentable. By the time ...
Read More