Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 78dd2e9

Browse files
committed
Corrected the invalid answer: Have implemented the program to find whether the array can be made strictly increasing using the values from another array.
1 parent 1627f31 commit 78dd2e9

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

.idea/workspace.xml

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/com/raj/MakeArrayStrictlyIncreasing.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ public static void main(String[] args) {
6666
if (initialValueChangedIndex != i) {
6767
for (int j : arr2) {
6868
if (arr1[i - 1] < j) {
69+
if(arr1[i] == j){
70+
break;
71+
}
6972
arr1[i] = j;
7073
isValueFounded = true;
7174
initialValueChangedIndex = i;

0 commit comments

Comments
 (0)