Starting from monday we will solve one programming question per day. Share the channel and study group with your friends:
@daily1interviewprogram
@coding_interview_prep
@daily1interviewprogram
@coding_interview_prep
Starting today we will start solving one DSA problem.
You can update your solutions in the comment section.
You can update your solutions in the comment section.
Day 1 Question:
Sort an array of 0s, 1s and 2s in C
Input: {1, 2, 0, 0, 1, 2, 1}
Output: {0, 0, 1, 1, 1, 2, 2}
Solution:
https://prodevelopertutorial.com/sort-an-array-of-0s-1s-and-2s-in-c/
You can add your solutions in the comment section:
Whatsapp Channel: https://whatsapp.com/channel/0029VbEBBOo9sBIEzSFDqT0u
Telegram Channel: @competitive_programming_question
Telegram Group for discussion: @coding_interview_prep
Instagram: https://www.instagram.com/fastpacedalgorithms/
Website: www.ProDeveloperTutorial.com
Sort an array of 0s, 1s and 2s in C
Input: {1, 2, 0, 0, 1, 2, 1}
Output: {0, 0, 1, 1, 1, 2, 2}
Solution:
https://prodevelopertutorial.com/sort-an-array-of-0s-1s-and-2s-in-c/
You can add your solutions in the comment section:
Whatsapp Channel: https://whatsapp.com/channel/0029VbEBBOo9sBIEzSFDqT0u
Telegram Channel: @competitive_programming_question
Telegram Group for discussion: @coding_interview_prep
Instagram: https://www.instagram.com/fastpacedalgorithms/
Website: www.ProDeveloperTutorial.com
ProDeveloperTutorial.com
Sort an array of 0s, 1s and 2s in C - ProDeveloperTutorial.com
Problem Description: Given an array of elements consisting of 0, 1, 2. Sort the array. Example: {1, 2, 0, 0, 1, 2, 1} Output: {0, 0, 1, 1, 1, 2, 2} Solution
Day 2 Question:
Given an array, the difference between the elements is one, find if the “key” element is present or not.
Input: {5, 6, 7, 6, 5, 4, 3, 4, 5, 6}
Key: 4
Output: The element 4 is found at the index 6.
Solution:
https://prodevelopertutorial.com/given-an-array-the-difference-between-the-elements-is-one-find-if-the-key-element-is-present-or-not/
You can add your solutions in the comment section:
Whatsapp Channel: https://whatsapp.com/channel/0029VbEBBOo9sBIEzSFDqT0u
Telegram Channel: @competitive_programming_question
Telegram Group for discussion: @coding_interview_prep
Instagram: https://www.instagram.com/fastpacedalgorithms/
Website: www.ProDeveloperTutorial.com
Given an array, the difference between the elements is one, find if the “key” element is present or not.
Input: {5, 6, 7, 6, 5, 4, 3, 4, 5, 6}
Key: 4
Output: The element 4 is found at the index 6.
Solution:
https://prodevelopertutorial.com/given-an-array-the-difference-between-the-elements-is-one-find-if-the-key-element-is-present-or-not/
You can add your solutions in the comment section:
Whatsapp Channel: https://whatsapp.com/channel/0029VbEBBOo9sBIEzSFDqT0u
Telegram Channel: @competitive_programming_question
Telegram Group for discussion: @coding_interview_prep
Instagram: https://www.instagram.com/fastpacedalgorithms/
Website: www.ProDeveloperTutorial.com
ProDeveloperTutorial.com
Given an array, the difference between the elements is one, find if the “key” element is present or not. - ProDeveloperTutorial.com
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 travelling the
Day 3 Question:
Given an unsorted array, find the minimum difference between 2 elements.
Input: {6, 10, 5, 42, 43, 1, 2}
Output: The minimum difference between is 1 the elements are 1 and 2.
You can add your solutions in the comment section:
https://prodevelopertutorial.com/given-an-unsorted-array-find-the-minimum-difference-between-2-elements/
Whatsapp Channel: https://whatsapp.com/channel/0029VbEBBOo9sBIEzSFDqT0u
Telegram Channel: @competitive_programming_question
Telegram Group for discussion: @coding_interview_prep
Instagram: https://www.instagram.com/fastpacedalgorithms/
Website: www.ProDeveloperTutorial.com
Given an unsorted array, find the minimum difference between 2 elements.
Input: {6, 10, 5, 42, 43, 1, 2}
Output: The minimum difference between is 1 the elements are 1 and 2.
You can add your solutions in the comment section:
https://prodevelopertutorial.com/given-an-unsorted-array-find-the-minimum-difference-between-2-elements/
Whatsapp Channel: https://whatsapp.com/channel/0029VbEBBOo9sBIEzSFDqT0u
Telegram Channel: @competitive_programming_question
Telegram Group for discussion: @coding_interview_prep
Instagram: https://www.instagram.com/fastpacedalgorithms/
Website: www.ProDeveloperTutorial.com
ProDeveloperTutorial.com
Given an unsorted array, find the minimum difference between 2 elements. - ProDeveloperTutorial.com
Problem Explanation: Given an unsorted array, the output should be the minimum difference between the elements and the elements itself. Example: {6, 10, 5,
Day 4 Question:
Given an unsorted array, find the least difference between the element pairs. Display all the pairs present.
Input: {5, 4, 3, 2, 1}
Output: {1, 2}, {2, 3}, {3, 4}, {4, 5}.
Solution:
https://prodevelopertutorial.com/given-an-unsorted-array-find-the-least-difference-between-the-element-pairs-display-all-the-pairs-present/
You can add your solutions in the comment section:
Whatsapp Channel: https://whatsapp.com/channel/0029VbEBBOo9sBIEzSFDqT0u
Telegram Channel: @competitive_programming_question
Telegram Group for discussion: @coding_interview_prep
Instagram: https://www.instagram.com/fastpacedalgorithms/
Website: www.ProDeveloperTutorial.com
Given an unsorted array, find the least difference between the element pairs. Display all the pairs present.
Input: {5, 4, 3, 2, 1}
Output: {1, 2}, {2, 3}, {3, 4}, {4, 5}.
Solution:
https://prodevelopertutorial.com/given-an-unsorted-array-find-the-least-difference-between-the-element-pairs-display-all-the-pairs-present/
You can add your solutions in the comment section:
Whatsapp Channel: https://whatsapp.com/channel/0029VbEBBOo9sBIEzSFDqT0u
Telegram Channel: @competitive_programming_question
Telegram Group for discussion: @coding_interview_prep
Instagram: https://www.instagram.com/fastpacedalgorithms/
Website: www.ProDeveloperTutorial.com
ProDeveloperTutorial.com
Given an unsorted array, find the least difference between the element pairs. Display all the pairs present. - ProDeveloperTutorial.com
Given an unsorted array, list all the pairs with a least difference.
I am seeing that, no one is writing the solution in the comment section of the post to evaluate. Please add your solution in any language in the comment section of the website
Day 5 Question:
Given an unsorted array, and a key. Find 2 elements such that the difference between the elements is equal to the key.
Input: {4, 2, 5, 8, 21, 34, 10} key = 24
Output: Pair found (34, 10).
Solution:
https://prodevelopertutorial.com/given-an-unsorted-array-and-a-key-find-2-elements-such-that-the-difference-between-the-elements-is-equal-to-the-key/
You can add your solutions in the comment section:
Whatsapp Channel: https://whatsapp.com/channel/0029VbEBBOo9sBIEzSFDqT0u
Telegram Channel: @competitive_programming_question
Telegram Group for discussion: @coding_interview_prep
Instagram: https://www.instagram.com/fastpacedalgorithms/
Website: www.ProDeveloperTutorial.com
Given an unsorted array, and a key. Find 2 elements such that the difference between the elements is equal to the key.
Input: {4, 2, 5, 8, 21, 34, 10} key = 24
Output: Pair found (34, 10).
Solution:
https://prodevelopertutorial.com/given-an-unsorted-array-and-a-key-find-2-elements-such-that-the-difference-between-the-elements-is-equal-to-the-key/
You can add your solutions in the comment section:
Whatsapp Channel: https://whatsapp.com/channel/0029VbEBBOo9sBIEzSFDqT0u
Telegram Channel: @competitive_programming_question
Telegram Group for discussion: @coding_interview_prep
Instagram: https://www.instagram.com/fastpacedalgorithms/
Website: www.ProDeveloperTutorial.com
ProDeveloperTutorial.com
Given an unsorted array, and a key. Find 2 elements such that the difference between the elements is equal to the key. - ProDe…
Example: {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:
Day 6 Question:
Given an unsorted integer array, find the smallest missing positive integer.
Input: [ 2, 3, -1, -2]
Output: 1
Solution:
https://prodevelopertutorial.com/given-an-unsorted-integer-array-find-the-smallest-missing-positive-integer/
You can add your solutions in the comment section:
Whatsapp Channel: https://whatsapp.com/channel/0029VbEBBOo9sBIEzSFDqT0u
Telegram Channel: @competitive_programming_question
Telegram Group for discussion: @coding_interview_prep
Instagram: https://www.instagram.com/fastpacedalgorithms/
Website: www.ProDeveloperTutorial.com
Given an unsorted integer array, find the smallest missing positive integer.
Input: [ 2, 3, -1, -2]
Output: 1
Solution:
https://prodevelopertutorial.com/given-an-unsorted-integer-array-find-the-smallest-missing-positive-integer/
You can add your solutions in the comment section:
Whatsapp Channel: https://whatsapp.com/channel/0029VbEBBOo9sBIEzSFDqT0u
Telegram Channel: @competitive_programming_question
Telegram Group for discussion: @coding_interview_prep
Instagram: https://www.instagram.com/fastpacedalgorithms/
Website: www.ProDeveloperTutorial.com
ProDeveloperTutorial.com
Given an unsorted integer array, find the smallest missing positive integer. - ProDeveloperTutorial.com
Note: 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
Day 7 Question:
Given an array, find all the repeated elements in C language.
Input: {1, 3, 2, 7, 5, 1, 3}
Output: {1, 3}
Solution:
https://prodevelopertutorial.com/given-an-array-find-all-the-repeated-elements-in-c-language/
You can add your solutions in the comment section:
Whatsapp Channel: https://whatsapp.com/channel/0029VbEBBOo9sBIEzSFDqT0u
Telegram Channel: @competitive_programming_question
Telegram Group for discussion: @coding_interview_prep
Instagram: https://www.instagram.com/fastpacedalgorithms/
Website: www.ProDeveloperTutorial.com
Given an array, find all the repeated elements in C language.
Input: {1, 3, 2, 7, 5, 1, 3}
Output: {1, 3}
Solution:
https://prodevelopertutorial.com/given-an-array-find-all-the-repeated-elements-in-c-language/
You can add your solutions in the comment section:
Whatsapp Channel: https://whatsapp.com/channel/0029VbEBBOo9sBIEzSFDqT0u
Telegram Channel: @competitive_programming_question
Telegram Group for discussion: @coding_interview_prep
Instagram: https://www.instagram.com/fastpacedalgorithms/
Website: www.ProDeveloperTutorial.com
ProDeveloperTutorial.com
Given an array, find all the repeated elements in C language. - ProDeveloperTutorial.com
Given a positive integer array, find all the elements that have been repeated and display them.
Day 8 Question:
Given an integer value, convert it into roman number.
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
IV 4
IX 9
XL 40
XC 100
CD 400
CM 900
Input: 3
Output: "III"
Solution:
https://prodevelopertutorial.com/given-an-integer-value-convert-it-into-roman-number/
You can add your solutions in the comment section:
Whatsapp Channel: https://whatsapp.com/channel/0029VbEBBOo9sBIEzSFDqT0u
Telegram Channel: @competitive_programming_question
Telegram Group for discussion: @coding_interview_prep
Instagram: https://www.instagram.com/fastpacedalgorithms/
Website: www.ProDeveloperTutorial.com
Given an integer value, convert it into roman number.
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
IV 4
IX 9
XL 40
XC 100
CD 400
CM 900
Input: 3
Output: "III"
Solution:
https://prodevelopertutorial.com/given-an-integer-value-convert-it-into-roman-number/
You can add your solutions in the comment section:
Whatsapp Channel: https://whatsapp.com/channel/0029VbEBBOo9sBIEzSFDqT0u
Telegram Channel: @competitive_programming_question
Telegram Group for discussion: @coding_interview_prep
Instagram: https://www.instagram.com/fastpacedalgorithms/
Website: www.ProDeveloperTutorial.com
ProDeveloperTutorial.com
Given an integer value, convert it into roman number. - ProDeveloperTutorial.com
Roman numbers are represented by below characters:
What is the worst-case time complexity of inserting n elements into an initially empty binary heap one by one?
Anonymous Quiz
7%
• A) O(n)
79%
• B) \(O(n \log n)\)
14%
• C) \(O(\log n)\)
0%
• D) O(n²)
Day 9 Question:
Given a string, and number of rows, write the string in zigzag pattern.
Input: string = “prodevelopertutorial”. Number of rows 3
Solution:
https://prodevelopertutorial.com/given-a-string-and-number-of-rows-write-the-string-in-zigzag-pattern/
You can add your solutions in the comment section:
Whatsapp Channel: https://whatsapp.com/channel/0029VbEBBOo9sBIEzSFDqT0u
Telegram Channel: @competitive_programming_question
Telegram Group for discussion: @coding_interview_prep
Instagram: https://www.instagram.com/fastpacedalgorithms/
Website: www.ProDeveloperTutorial.com
Given a string, and number of rows, write the string in zigzag pattern.
Input: string = “prodevelopertutorial”. Number of rows 3
Solution:
https://prodevelopertutorial.com/given-a-string-and-number-of-rows-write-the-string-in-zigzag-pattern/
You can add your solutions in the comment section:
Whatsapp Channel: https://whatsapp.com/channel/0029VbEBBOo9sBIEzSFDqT0u
Telegram Channel: @competitive_programming_question
Telegram Group for discussion: @coding_interview_prep
Instagram: https://www.instagram.com/fastpacedalgorithms/
Website: www.ProDeveloperTutorial.com
ProDeveloperTutorial.com
Given a string, and number of rows, write the string in zigzag pattern. - ProDeveloperTutorial.com
Given a string “prodevelopertutorial” and number of rows is 3. Write the string in a zigzag pattern.