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
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:
Forwarded from Competitive Programming
What is the worst-case time complexity of inserting n elements into an initially empty binary heap one by one?
Anonymous Quiz
11%
• A) O(n)
72%
• B) \(O(n \log n)\)
11%
• C) \(O(\log n)\)
6%
• 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.
Forwarded from Competitive Programming
Which traversal of a Binary Search Tree (BST) outputs its elements in strictly ascending sorted order (assuming no duplicates)?
Anonymous Quiz
29%
A) Pre-order
18%
B) Post-order
47%
C) In-order
6%
D) Level-order
Day 10 Question:
Find the Container with Most Water explanation with diagram and solution
Given n non-negative integers a1, a2, …, an , where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, such that the container contains the most water.
Input: [3, 5, 4, 6]
Output: [15]
Solution:
https://prodevelopertutorial.com/find-the-container-with-most-water-explanation-with-diagram-and-solution/
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
Find the Container with Most Water explanation with diagram and solution
Given n non-negative integers a1, a2, …, an , where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, such that the container contains the most water.
Input: [3, 5, 4, 6]
Output: [15]
Solution:
https://prodevelopertutorial.com/find-the-container-with-most-water-explanation-with-diagram-and-solution/
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
Find the Container with Most Water explanation with diagram and solution - ProDeveloperTutorial.com
Problem description: Given n non-negative integers a1, a2, ..., an , where each represents a point at coordinate (i, ai). n vertical lines are drawn such that
Forwarded from Competitive Programming
Which algorithm is best suited for finding the shortest path in a weighted graph that contains negative edge weights (but no negative weight cycles)?
Anonymous Quiz
39%
• A) Dijkstra's Algorithm
4%
• B) Prim's Algorithm
54%
• C) Bellman-Ford Algorithm
4%
• D) Breadth-First Search (BFS)
Day 11 Question:
Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.
Examples:
Input -> output
1,2,3 → 1,3,2
3,2,1 → 1,2,3
1,1,5 → 1,5,1
Solution:
https://prodevelopertutorial.com/implement-next-permutation-which-rearranges-numbers-into-the-lexicographically-next-greater-permutation-of-numbers/
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
Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.
Examples:
Input -> output
1,2,3 → 1,3,2
3,2,1 → 1,2,3
1,1,5 → 1,5,1
Solution:
https://prodevelopertutorial.com/implement-next-permutation-which-rearranges-numbers-into-the-lexicographically-next-greater-permutation-of-numbers/
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
Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. - ProDeve…
If such arrangement is not possible, it must rearrange it as the lowest possible order (ie, sorted in ascending order). Examples: Input -> output 1,2,3 →
Day 12 Question:
Given a collection of candidate numbers and a key, find all unique combinations in candidates where the candidate numbers sums to target.
Input: candidates = [10,1,2,7,6,1,5], target = 8,
A solution set is:
[
[1, 7],
[1, 2, 5],
[2, 6],
[1, 1, 6]
]
Solution:
https://prodevelopertutorial.com/given-a-collection-of-candidate-numbers-and-a-key-find-all-unique-combinations-in-candidates-where-the-candidate-numbers-sums-to-target/
You can add your solutions in the comment section.
Given a collection of candidate numbers and a key, find all unique combinations in candidates where the candidate numbers sums to target.
Input: candidates = [10,1,2,7,6,1,5], target = 8,
A solution set is:
[
[1, 7],
[1, 2, 5],
[2, 6],
[1, 1, 6]
]
Solution:
https://prodevelopertutorial.com/given-a-collection-of-candidate-numbers-and-a-key-find-all-unique-combinations-in-candidates-where-the-candidate-numbers-sums-to-target/
You can add your solutions in the comment section.
ProDeveloperTutorial.com
Given a collection of candidate numbers and a key, find all unique combinations in candidates where the candidate numbers sums…
Each number in candidates may only be used once in the combination.
Forwarded from Competitive Programming
Which of the following sorting algorithms is not stable in its standard implementation?
Anonymous Quiz
28%
• A) Merge Sort
25%
• B) Insertion Sort
17%
• C) Bubble Sort
31%
• D) Quick Sort