×
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
2512
Answers
Program to check minimum number of characters needed to make string palindrome in Python
Python
Server Side Programming
Programming
Arnab Chakraborty
Published on 12-Oct-2020 15:34:08
Suppose we have a string s, we have to find the minimum number of characters needed to be inserted so that the string becomes a palindrome.So, if the input is like s = "mad", then the output will be 2, as we can insert "am" to get "madam".To solve this, ...
Read More
Program to find an ancestor which is common of two elements in a binary tree in Python
Python
Server Side Programming
Programming
Arnab Chakraborty
Published on 12-Oct-2020 15:31:11
Suppose we have a binary tree, and we also have two numbers a and b, we have to find the value of the lowest node that has a and b as descendants. We have to keep in mind that a node can be a descendant of itself.So, if the input ...
Read More
Program to find minimum length of lossy Run-Length Encoding in Python
Python
Server Side Programming
Programming
Arnab Chakraborty
Published on 10-Oct-2020 18:32:01
Suppose we have a lowercase string s and another value k. Now consider an operation where we perform a run-length encoding on a string by putting repeated successive characters as a count and character. So if the string is like "aaabbc" would be encoded as "3a2bc". Here we do not ...
Read More
Program to find sum of longest sum path from root to leaf of a binary tree in Python
Python
Server Side Programming
Programming
Arnab Chakraborty
Published on 10-Oct-2020 17:42:45
Suppose we have a binary tree, we have to find the sum of the longest path from the root to a leaf node. If there are two same long paths, return the path with larger sum.So, if the input is likethen the output will be 20.To solve this, we will ...
Read More
Program to find longest path between two nodes of a tree in Python
Arnab Chakraborty
Published on 10-Oct-2020 17:34:43
Suppose we have a binary tree; we have to find the longest path between any two nodes in the tree.So, if the input is like then the output will be 5 To solve this, we will follow these steps:ans := 0Define a function getMaxPath() . This will take nodeif node is null, ...
Read More
Program to find the length of longest substring which has two distinct elements in Python
Python
Server Side Programming
Programming
Arnab Chakraborty
Published on 10-Oct-2020 17:25:33
Suppose we have a string s, we have to find the length of the longest substring that contains at most 2 distinct characters.So, if the input is like s = "xyzzy", then the output will be 4, as "yzzy" is the longest substring with at most 2 unique characters.To solve ...
Read More
Program to find length of longest sublist with given condition in Python
Python
Server Side Programming
Programming
Arnab Chakraborty
Published on 10-Oct-2020 17:19:55
Suppose we have a list of numbers called nums, we have to find the length of the longest sublist where 2 * minimum of sublist > maximum of sublist.So, if the input is like nums = [10, 2, 6, 6, 4, 4], then the output will be 4, as the ...
Read More
Program to find length of longest palindromic substring in Python
Python
Server Side Programming
Programming
Arnab Chakraborty
Published on 10-Oct-2020 17:11:17
Suppose we have a string S. We have to find the length of longest palindromic substring in S. We are assuming that the length of the string S is 1000. So if the string is “BABAC”, then the longest palindromic substring is “BAB” and length is 3.To solve this, we ...
Read More
Program to find length of longest alternating inequality elements sublist in Python
Python
Server Side Programming
Programming
Arnab Chakraborty
Published on 10-Oct-2020 17:04:23
Suppose we have a list of mumbers called nums, and find the length of the longest sublist in nums such that the equality relation between every consecutive numbers changes alternatively between less-than and greater-than operation. The first two numbers' inequality may be either less-than or greater-than.So, if the input is ...
Read More
Program to find length of longest increasing subsequence in Python
Python
Server Side Programming
Programming
Arnab Chakraborty
Published on 10-Oct-2020 16:39:14
Suppose we have a list of numbers. We have to find the length of longest increasing subsequence. So if the input is like [6, 1, 7, 2, 8, 3, 4, 5], then the output will be 5, as the longest increasing subsequence is [2, 3, 4, 5, 6].To solve this, ...
Read More
1
2
3
4
5
6
7
...
252
Next
Advertisements
Print
Add Notes
Bookmark this page
Report Error
Suggestions
Save
Close
Dashboard
Logout