ProDeveloperTutorial.com

Tutorials and Programming Solutions
Menu
  • Shell Scripting
  • System Design
  • Linux System Programming
  • 4g LTE
  • Coding questions
  • C
  • C++
  • DSA
  • GIT
  • 450 DSA Cracker
  • 5G NR
  • O-RAN
Given an input string (s) and a pattern (p), implement regular expression matching with support for ‘.’ and ‘*’.

Given an input string (s) and a pattern (p), implement regular expression matching with support for ‘.’ and ‘*’.

Given an input string (s) and a pattern (p), implement regular expression matching with support for ‘.’ and ‘*’. Note: '.' Matches any single character. '*' Matches zero or more of the preceding element.   Example 1: Input: Pattern: a.b Valid Strings: acb - any character can be present …
Full Article
No Comments
Given a string find the longest Palindromic Substring with detailed explanation and solution in C++.

Given a string find the longest Palindromic Substring with detailed explanation and solution in C++.

A palindromic string will give the same string when reading reverse. Example: “aba” reverse is “aba” hence is a palindromic string. Input: ashdkabajjseiw       Output: aba There are 3 approaches, in this tutorial, we shall discuss 2 methods Brute force approach. Time Complexity O(n ^ 3) Dynamic …
Full Article
2 Comments
Given a string, and number of rows, write the string in zigzag pattern.

Given a string, and number of rows, write the string in zigzag pattern.

Problem Explanation: Given a string “prodevelopertutorial” and number of rows is 3. Write the string in a zigzag pattern. Example: Input: string = “prodevelopertutorial”. Number of rows 3 Output: array output should be: "peotrrdvlpruoiloeeta" Visualization of writing elements in zigzag fashion: Visualization of writing output in …
Full Article
1 Comment
Given an integer value, convert it into roman number.

Given an integer value, convert it into roman number.

Problem Explanation: Roman numbers are represented by below characters: I             1 V             5 X             10 L             50 C             100 D             500 M             1000 By using the above symbols we can further extend to deduce below numbers. IV                                4 IX                                9 XL                               40 XC                              100 CD                              400 …
Full Article
No Comments
Given an array, find all the repeated elements in C language

Given an array, find all the repeated elements in C language

Problem Description: Given a positive integer array, find all the elements that have been repeated and display them. Example: Input: {1, 3, 2, 7, 5, 1, 3} Output: 1, 3 Solution: The solution is very simple. We traverse through the array and make the element in …
Full Article
5 Comments
Given an unsorted integer array, find the smallest missing positive integer.

Given an unsorted integer array, find the smallest missing positive integer.

Find the element in the order O(n) with a constant extra space. Example 1: Input: Output: 1 Example 2: Input: Output: 1 Solution Explanation: The solution is actually very simple.  And we know that an integer starts with 1 to n not zero. Hence what we …
Full Article
3 Comments
Given an unsorted array, and a key. Find 2 elements such that the difference between the elements is equal to the key.

Given an unsorted array, and a key. Find 2 elements such that the difference between the elements is equal to the key.

Example: Input: {4, 2, 5, 8, 21, 34, 10} key = 24 Output: Pair found (34, 10) This problem can be solved in 2 ways. Solution 1: Brute force method. Explanation: Step 1: Take 2 loops, outer loop and an inner loop. Step 2: The element …
Full Article
11 Comments
Given an unsorted array, find the least difference between the element pairs. Display all the pairs present.

Given an unsorted array, find the least difference between the element pairs. Display all the pairs present.

Problem Statement: Given an unsorted array, list all the pairs with the least difference. Example: Input: {5, 4, 3, 2, 1} Output: {1, 2}, {2, 3}, {3, 4}, {4, 5}. Solution Explanation: Step 1: Sort the array. Step 2: Find the least difference. Step 3: Find …
Full Article
1 Comment
Given an unsorted array, find the minimum difference between 2 elements.

Given an unsorted array, find the minimum difference between 2 elements.

Problem Explanation: Given an unsorted array, the output should be the minimum difference between the elements and the elements itself. Example: Input: {6, 10, 5, 42, 43, 1, 2} output: The minimum difference between is 1 the elements are 1 and 2. This can be solved …
Full Article
8 Comments
Given an array, the difference between the elements is one, find if the “key” element is present or not.

Given an array, the difference between the elements is one, find if the “key” element is present or not.

Example: Array: {5, 6, 7, 6, 5, 4, 3, 4, 5, 6} Key: 4 Output: The element 4 is found at the index 6. Explanation: We can solve this approach by traveling the matrix element one by one and searching for the element. But we can …
Full Article
5 Comments

Posts navigation

Prev 1 … 78 79 80 81 82 83 Next
  • Shell Scripting
  • System Design
  • Linux System Programming
  • 4g LTE
  • Coding questions
  • C
  • C++
  • DSA
  • GIT
  • 450 DSA Cracker
  • 5G NR
  • O-RAN

ProDeveloperTutorial.com

Tutorials and Programming Solutions
Copyright © 2023 ProDeveloperTutorial.com
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Do not sell my personal information.
Cookie SettingsAccept
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT