Комментарии:
luv u
Ответитьfor(int i=0;i<n-1;i++)
{
if(i<index)
{
b[i]=a[i];
}
else if(i==index || i>index)
{
b[i]=a[i+1];
}
}
Mam, muze doubt hai. Aapne array B ko print kiya hai. Array A se element delete hua hi nahi.
ОтветитьMAM please upload your code on git
ОтветитьCan you share the source code for each video ? @ForMyScholars
Ответить// better code
for(i=0;i<n-1;i++)
{
if(i<m)
arr2[i]=arr[i];
else
arr2[i]=arr[i+1];
}
Thankyou mam.I have been trying to understand this logic for 1 year but I was unable to understand but after watching your video I can able to understand in 💯 %
ОтветитьThanks di
ОтветитьHere is another method mentioned by you @ForMyScholars , by using Existing Array :
Scanner vfk =new Scanner(System.in);
System.out.println("Enter no of elements : ");
int n=vfk.nextInt();
int a[] = new int[n];
for (int i=0;i<n;i++)
{
System.out.println("Enter element no."+i+": ");
a[i]=vfk.nextInt();
}
System.out.println("Elements are");
for (int i=0;i<n;i++)
{
System.out.print(a[i]+" ");
}
System.out.println(" ");
System.out.println("Enter index to be deleted :");
int ind=vfk.nextInt();
for (int i=0;i<n-1;i++)
{
if (i==ind||i>ind)
{
int temp=a[i+1];
a[i]=temp;
}
}
for (int i=0;i<n-1;i++)
{
System.out.print(a[i]+ " ");
}
Thanks For this DSA Course😊😊
In the last "else" part
Can't we write
B[ i ] = a[ i + 1] ;
What is a.length . this veriable ka value kithna
Ответитьgood content and understandable explanation. keep it up
ОтветитьNice explanation
ОтветитьCan you show it by using SC O(1)?
ОтветитьMam using continue statement element is skipped but not deleted from memory. plzz let me know mam .
Ответитьjitni tarif kri jae km h itna best explaination aaj tk khi nhi dekha copy pr fir code pr hi input leke wah mja aa gya
ОтветитьMa'am we can do insert, update, delete only use one array through don't need to create a second array.
ОтветитьQuality content♥️
ОтветитьMam video upload kro is week nhi aayi h
ОтветитьMa'am videos are very good please increase the videos upload frequency
Ответитьजिस तरह हम इंटरनेट से सॉफ्टवेयर डाउनलोड कर के इंस्टॉल करने के बाद उसे use करते है
उसी तरह हम चाहते है की c language me simple calculator बनया है वह एक सॉफ्टवेयर की तरह हो जाए की कोई इंस्टॉल करने के बाद उसे use कर सके
Please bataiye ma'am 🙏🙏🙏