×
Home
Jobs
Tools
Coding Ground
Current Affairs
UPSC Notes
Online Tutors
Whiteboard
Net Meeting
Tutorix
Login
Packages
Categories
Java
JSP
iOS
HTML
Android
Python
C Programming
C++ Programming
C#
PHP
CSS
Javascript
jQuery
SAP
SAP HANA
Data Structure
RDBMS
MySQL
Mathematics
8085 Microprocessor
Operating System
Digital Electronics
Analysis of Algorithms
Mobile Development
Front End
Web Development
Selenium
MongoDB
Computer Network
General Topics
Library
Videos
Q/A
eBooks
Login
Library
Videos
eBooks
Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Selected Reading
UPSC IAS Exams Notes
Developer's Best Practices
Questions and Answers
Effective Resume Writing
HR Interview Questions
Computer Glossary
Who is Who
Arnab Chakraborty
has Published
3296
Answers
Check if given array is almost sorted (elements are at-most one position away) in Python
Python
Server Side Programming
Programming
Arnab Chakraborty
Published on 18-Jan-2021 17:12:56
Suppose we have an array of numbers called nums, where all elements are unique. We have to check whether nums is almost sorted or not. As we know an array is almost sorted when any of its elements can occur at a maximum of 1 distance away from its original ...
Read More
Check if frequency of each digit is less than the digit in Python
Python
Server Side Programming
Programming
Arnab Chakraborty
Published on 18-Jan-2021 17:11:28
Suppose we have a number n, we have to check whether the occurrence of each digit of n is less than or equal to digit itself.So, if the input is like n = 5162569, then the output will be True as the digits and frequencies are (5, 2), (1, 1), ...
Read More
Check if frequency of characters are in Recaman Series in Python
Python
Server Side Programming
Programming
Arnab Chakraborty
Published on 18-Jan-2021 17:06:06
Suppose we have a lowercase string s. We have to check whether the occurrences of alphabets in s, after rearranging in any possible manner, generates the Recaman’s Sequence (ignoring the first term).The Recaman’s sequence is as follows −$$a_{n}=\begin{cases}\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:0(if\:n=0) & \\a_{n-1}-n(if\:a_{n}-n>0\wedge not\:present\in sequence) & \\\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:a_{n-1}+n(otherwise)\end{cases}$$Some of the items of Recaman's Sequence ...
Read More
Check if frequency of character in one string is a factor or multiple of frequency of same character in other string in Python
Python
Server Side Programming
Programming
Arnab Chakraborty
Published on 18-Jan-2021 17:03:36
Suppose we have two strings s and t, we have to check whether the occurrences of a character in s is multiple or a factor in t.So, if the input is like s = "xxyzzw" t = "yyyxxxxzz", then the output will be True as frequency of x in s ...
Read More
Check if frequency of all characters can become same by one removal in Python
Python
Server Side Programming
Programming
Arnab Chakraborty
Published on 18-Jan-2021 17:01:45
Suppose we have a lowercase string s. We have to check whether the frequency of all characters are same after deleting one character or not.So, if the input is like s = "abbc", then the output will be True as we can delete one b to get string "abc" where ...
Read More
Check If every group of a is followed by a group of b of same length in Python
Python
Server Side Programming
Programming
Arnab Chakraborty
Published on 18-Jan-2021 16:57:59
Suppose we have a lowercase string s with only two characters a and b. We have to check whether every group of consecutive a's is followed by group of consecutive b's of equal length.So, if the input is like s = "abaaabbbaabbaabbab", then the output will be True, as all ...
Read More
Check if elements of Linked List are present in pair in Python
Python
Server Side Programming
Programming
Arnab Chakraborty
Published on 18-Jan-2021 16:55:44
Suppose we have a singly linked list. We have to check whether each element in the given linked list is present in a pair, in other words all elements occur even no. of times.So, if the input is like list = [2, 5, 5, 2, 3, 3], then the output ...
Read More
Check if elements of array can be made equal by multiplying given prime numbers in Python
Python
Server Side Programming
Programming
Arnab Chakraborty
Published on 18-Jan-2021 16:53:58
Suppose we have two arrays, one is nums and another one is primes. We have to check whether it is possible to make all the elements of nums equal by multiplying one or more prime numbers from primes array.So, if the input is like nums = [25, 100] primes = ...
Read More
Check if elements of an array can be arranged satisfying the given condition in Python
Python
Server Side Programming
Programming
Arnab Chakraborty
Published on 18-Jan-2021 16:50:02
Suppose we have an array called nums. We have to check whether it is possible to rearrange the elements of nums such that it follows the condition −So, if the input is like nums = [8, -4, 4, -8], then the output will be True as if we arrange the ...
Read More
Check if edit distance between two strings is one in Python
Python
Server Side Programming
Programming
Arnab Chakraborty
Published on 18-Jan-2021 16:48:01
Suppose we have two strings s and t. We have to check whether the edit distance between s and t is exactly one or not. Here edit between two strings means any of these three −Insert a characterDelete a characterReplace a characterSo, if the input is like s = "hello" ...
Read More
Previous
1
...
3
4
5
6
7
8
9
...
330
Next
Advertisements
Print
Add Notes
Bookmark this page
Report Error
Suggestions
Save
Close
Dashboard
Logout