isEmpty() - It will tell us whether the array List empty or filled. subList(first index, last index) - It will give us the elements from the array List from the index specified.
@Sujan_Das14
3 жыл бұрын
toArray() as the name says it converts a linked list to a sequential array code: Object[] obj = new Object[list.size()]; -> creates an array of the same length of the linkedList obj = list.toArray(); and done obj is the array containing the same value as of the linkedList
@alnahian8051
Жыл бұрын
My two methods are: push(): it generally pushes the given element on top of every other elements like a stack, and it shifts other elements by 1 and a fact to note here that the indexing in linked list starts from (-1) removeFirstOccurrence(): removes the first occurrence of the given element when compiler reads the linked list from first to last
@vinitparmar926
4 ай бұрын
Please make a correction that there is no specific indexing in LinkedIList, rather the first node points to null in a LinkedIList.
@nikhilgarg4657
3 жыл бұрын
contains() is a method that is used to check whether the given object as parameter is present there or not.
@shubhamsawant5129
3 жыл бұрын
Harry Bhai.. lots of love... Apke wise courses se sikhkar me place ho Gaya Hoon.. Jo aap itne ease me sikhate hai koi language difficult nhi lagti.. mere jaise Kai log hai jinhe guidance nhi milta Jo ap de rahe hai.. lots of thanks bhai..🙏 happy teacher's day in advance
@AshishKhetwal
2 ай бұрын
nice bro :)
@_sarthak_.2
2 жыл бұрын
pop() is mainly used for (LIFO) int value=number.pop(); System.out.println(value); listIterator() is mainly used for to print array index starts from your given Array Index ListIterator num=number.listIterator(2); while(num.hasNext()) { System.out.println(num.next()); }
@ultimatebeast1941
3 жыл бұрын
Waiting for 1 Million Subscribers, or 1M Programmers..... Thanks Harry Bhai for free teaching.. I like your all courses specially your roadmaps tutorials...😀😀
@AshishKhetwal
2 ай бұрын
today more than 6M successful programmers of Harry bhai🥰🥰
@mishikhan3765
3 жыл бұрын
LinkedList Methods: toArray() : Returns an array containing all of the elements in this list in proper sequence getFirst() : Returns the first element in this list getLast() : Returns the last element in this list.
@akula2331
3 жыл бұрын
bro don't stop posting please take this course to the advanced java where we can build a game/app including graphics and sound. please!!!
@gopal_software
3 жыл бұрын
Right ✔️✅✔️
@gopal_software
3 жыл бұрын
Sahi kha aapne
@uchihaobito4009
3 жыл бұрын
😑
@sambitsinha4845
3 жыл бұрын
I am studying the course... But I am lagging..... I am waiting for the day when I will catch you.....but ap ke kam ke liye ek like to banta hain...❤️❤️
@MrSun15920
2 жыл бұрын
.remove(int index): It is a method used in LinkedList which removes an element or object if you like (even though it's wrong) from the index written in the brackets.
@javedakhtar5000
3 жыл бұрын
1. removeFirst() --- List ka first element remove kr dega 2. removeLast() --- List ka last element remove kr dega 3. offer() --- Ek element lega aur usko list ki tail/end me add kr dega 4. offerFirst() --- Ek element lega aur usko list ki starting me add kr dega 5. offerLast() --- Ek element lega aur usko list ke end me add kr dega
@sanketnegi1
2 жыл бұрын
bhai .add() and insert() and .offer mein kya farak hai fir.
@RishitaTomar-ku8ob
11 ай бұрын
I completed whole DSA series from your vedio it's very helpful and mind-blowing series 😊if any one have issue in DSA watch this series
@sumitsrivastava8859
3 жыл бұрын
Harry bhai..please comolete data science series. I request you to cover below : - - deep learning - text analytics - NLP - ANN
@krishkanojia2850
3 жыл бұрын
add(int index, E element) -> This add the element at a specific position. listIterator(int index) -> This show the list in sequential order according to their index.
@OmGupta
3 жыл бұрын
Ready for 1 million
@aayushkumargupta291
Жыл бұрын
It's 4.2 today 🤘🤘
@manasgotefode
Жыл бұрын
@@aayushkumargupta291its 4.6M today!
@mindpower1332
Жыл бұрын
@@aayushkumargupta291no bro 4.4M its time
@AsadKhan-1227
4 ай бұрын
6m now😂
@ANSHYADAV-uc4rh
3 ай бұрын
@@AsadKhan-1227 6.15 now
@murlidhartalwani4807
3 жыл бұрын
Sir, Please Bring OpenCv full tutorial
@crazyduniya128
3 жыл бұрын
******ATTENTION ⚠****** JOIN CODEWITHHARRY FANCLUB GROUP ON FACEBOOK AND SHARE ALL VIDEOS OF HARRY BHAI, IT IS LIKE A GIFT TO HARRY BRO FROM US. LET'S GO (1 MILLION SUBSCRIBER CONGRATULATION PRESENT IN ADVANCE ) *****PLEASE DON'T IGNORE THIS *****
@nostrategy-ur2wk
2 ай бұрын
ls.peek() -> Returns the first element of the list ls.reversed() -> Returns a reverse order of the list
@gopal_software
3 жыл бұрын
Sir java ke aur video banao .......... Kafi accha course hai .............
@aniketkumar3126
3 жыл бұрын
Harry bhai python wala course kar ka aunga kuch dino ma java v sikhunga U r the best👍
@234_rebantachakraborty3
3 жыл бұрын
bhai ek request hai.....internship wagera k baare mai ek informative vedio banao na plz................btw love ur in-depth knowledge giving channel
@Sheladiya_Rens.-
Жыл бұрын
offer() == This method add a last element in linked-list peek() == print the first element in linked-list pop() == print the first element in original linked-list
@hardikmishra9532
3 жыл бұрын
Imagining a heart from this legend so I can take screenshot.
@Maxtron
3 жыл бұрын
Nope nope
@mohammadfaizanhashmi4213
3 жыл бұрын
@@Maxtron Nope nope
@devanshmaheshwari5108
6 ай бұрын
Till now waiting
@pankajkorkalai9049
4 ай бұрын
Nope
@V.E.N.U.Z.D.O.N.O.A
4 ай бұрын
No !
@AmanSingh-nh1ow
2 жыл бұрын
2M suscriber,, congrax Harry bhai
@Subhash.Jadav19
7 ай бұрын
This Java Course is OP!!!!
@mubaraknative
Жыл бұрын
toFrom() returns the index value from which the index is starting
@sourabhnayak9765
3 жыл бұрын
I want to know that java k DSA v cover hoga
@imnemo2327
3 жыл бұрын
Nah
@neharai741
2 жыл бұрын
Listen?
@khajaxo
2 жыл бұрын
Nahi bhai
@theDivyanshuSrivastava
6 ай бұрын
list.offer(12) ---> It will add the element at the last of the LinkedList i.e., at the end of the occurrence of other eements.
.poll() it will remove the head of the list .push() it will add element into the stack of the list
@nehasingh8994
3 жыл бұрын
sir can we get the complete course notes in one single pdf file .
@Mrlalit01
Жыл бұрын
Hy
@ritikkumar5495
Жыл бұрын
No
@anirudhbhat8008
3 жыл бұрын
toArray()---> Stores the values of list into a array(just copy the values) and can be printed as an array. So that there is no harm to the list even if we modify the returned array. peekFirst()---> Copies the value present first in the list and can be assigned to a variable. (That value is not removed from the list) pollFirst()---> Removes the value present first in the list so that can be assigned to another variable. This is what I have understood from the documentation and if there is any mistake , pardon me.....
@SonuDeveloper
2 ай бұрын
Removelast() =remove the last element of the linked list Size() = return the element of the linked list
@abhinavsinha2813
3 жыл бұрын
First view is mine I am your big fan harry sir
@balboa7
2 жыл бұрын
1. peekFirst() This method mainlyretrieves (NOT remove) the first element of a linked list. 2. removeLast(): This method removes the last element of a linked list
@maulikmishra3885
3 жыл бұрын
Maulik Mishra from Pune pop(): Removes the element from last position. push(E e): Adds an element in the last position.
@gopal_software
3 жыл бұрын
Nice 👍👍👍
@dhirenpatil8600
3 жыл бұрын
hey bro pop(); removes first element from the linked list..
@dhirenpatil8600
3 жыл бұрын
push(); add element at first position of linked list.
@fellincode2607
3 жыл бұрын
are baap last position hata kar first likhdo nahi to naye viewers dekh kar last position hi samajh lenge
@FutureTechieKid
2 жыл бұрын
this is stack method not array LinkedList ArrayList method nob
@badalsahoo444
Жыл бұрын
The methods that I used for Linkedlist: 1. offerFirst() - This is same as add () methods,It add the element at first in a linkedlist. 2.push() - We use this method for pushing an element , means this method only show for temporary(for few time), we can remove this element from our linkedlist by using pop() method. 3.pop()- This method only removes the pushing element not removes the other element! Thanks Harry bhai
@user-ex3ms3wg2i
3 күн бұрын
1) l1.poll(); // -->Remove the head of the element from the list. 2) l1.pollFirst(); // -->Remove the first element from the list if the list is empty return null. 3) l1.pollLast(); // -->Remove the last element from the list if the list is empty return null.
@avinash7453
3 жыл бұрын
Congrats you are going to rise 1million subscriber this very fastest channel even 1.1k videos 🚩🚩🚩🚩
@akhileshdawar5147
3 жыл бұрын
Harry bro can you make one most frequent asked java interview questions video i think that would be very helpful for all of us.
@gopal_software
3 жыл бұрын
Right ✔️✅✔️
@TheRickoast
Жыл бұрын
removeFirstOccurance() --> removes the first occurance toArray() --> converts the list to an array
@pallavburnwal904
8 ай бұрын
1.isempty()- return true if the list contains no element 2. remove() - remove the index of the element in arraylist
@asharma8740
3 жыл бұрын
offerFirst() .....adds an element in beginning of the list. pop() ....gives the first element of the list.
@259_parthpatidar9
3 жыл бұрын
pop( )-->deletes the first element of list and returns the popped element.
@259_parthpatidar9
3 жыл бұрын
while peek() -> gives the first element of the list
@payelpal8775
Жыл бұрын
k1.size() --> gives the size of the list k1.removeLast() --> removes the last element of the list
@GunjanPandya-s8w
5 ай бұрын
contains(Object o)-->agar element present hai list mai toh true return karega. pop()-->stack ka last element ko remove karega. push(E e)-->last position mein element ko add karega
@259_parthpatidar9
3 жыл бұрын
pollLast( ) -->linkedlist me last me jo element hoga use remove krdega, aur agr link list me koi element nhi h to NULL output me dega
@KrishnaSharma-xm1oj
3 жыл бұрын
Hi Harry I am big big fan of yours I have learner web development from you only. :)
@madhurinavghare4941
3 жыл бұрын
Only 6k subscriber reaming to make 1m from yesterday I was sharing the link of this channel as much as possible because I just want to see 1m there. His hard work is appreciable man🥇
@zuhaibulhassan.
2 жыл бұрын
l1.offer(1822); //add the element at the node(last) l1.push(4588); //enter the element on the list at the last-in position
@RK-df1jp
3 жыл бұрын
harry bhai angular/react js par complete video banaiye i want to learn both plz...
@devanshsinghparmar
3 жыл бұрын
1 million soon bro
@Abhilash7539
3 жыл бұрын
element() - it returns the head element of the array peek() - same as element method
@amirmalkani7374
2 жыл бұрын
Only the difference is if the list is empty the peek() returns Null and element() returns Exception... :)
@thisiscreatorjay
3 жыл бұрын
peekFirst() = retrieve the first element of the list but does not remove it. Collections.sort(LinkedList_objectname)= it will sort all the elements in the linked list
@ahmedharoon4013
4 күн бұрын
"peekFirst()" Returns the first element (if the deque isn't empty) without removing it . Otherwise it will return null if deque is empty.
@_devenderpal_
3 жыл бұрын
Love u bro ❤️
@hrishiraj1761
3 жыл бұрын
1 million soon
@kash1903
8 ай бұрын
isempty( ) - returns boolean value and tells is the Arraylist is empty or not size( ) - returns the size of the array
@kapilrana4043
3 жыл бұрын
offer(E e)->>add the specific elements as the last element or tail element peek()->>Retrieves, but does not remove, the head (first element) of this list.
@satvikmittal4487
3 жыл бұрын
removeFirstOccurrence(Object o)->jahan par 'o' pehli baar aaya hoga,use vahan se hata dega. pollLast()->list ke aakhri element ko return karke usi ko delete kar dega
@abhishekpundir5941
3 жыл бұрын
Aapne sbhi topics ko bhot easy tareeko se pdhaya h
@RishitaTomar-ku8ob
11 ай бұрын
Two methods: 1.removeLast()- Remove the last elment from the list. 2.peek()-return the head elment of the list,it return null if head is empty
@krishanudutta2943
Жыл бұрын
1. .poll():removes first element from the list 2. .pop():removes and return first element from the list
@abhishektyagialwayswins777
2 жыл бұрын
1} .peekFirst() it returns the first element of the list and null if the list is empty 2.} .peekLast() return the last element return null if list is empty. Note:- Both these methods do not remove elements👾 from LL.
@prasadsawant7
3 жыл бұрын
head matlab LinkedList ka pehla element. peek():- Peek method linked list me zak ke dekhta hai ki head hai ya nahi agar hai to usko remove nahi karega agar nahi hoga head to null return karega. poll();- poll method bhi peek jaisa he hai thoda bahut par isme poll kinked list jake check karta hai head hai kya agar hoga to remove karega agar nahi rahega to null return karega. almost sari methods same hai sare Collections Framework ki bas ek bar try karo sabko sab Collections ke sath apne aap samajh jayega ki kya ho raha hai aur ratta marne ki bhi jarurat nahi padegi. Waise bhi programming me ratta bilkul mat marna. Kyuki companies ko Rancho chahiye Chatur nahi.
@mohdjohn4315
3 жыл бұрын
Bro please don't stop posting... Pls complete this course
@gopal_software
3 жыл бұрын
Right ✔️✅✔️
@yuvrajkaushik31
Жыл бұрын
l1.pop() --> Pops the element from the stack represented by the LinkedList l1.push() --> Pushes the element to the stack represented by the LinkedList
@yogirajpatil1872
3 жыл бұрын
Harry bhai please go for Java Design Pattern like structure,facade,decorator etc.
@anshulchoudhary2916
Жыл бұрын
.peekLast() -> it will show the last element of the linkedList and if linkedList in empty it will return null
@sanketabhale7233
10 ай бұрын
Peek() = retrieves or gives first element.
@aadityapal7187
3 жыл бұрын
Harry sir please tell me how to save our Java intelliJ idea code in laptop or PC
@mubeenjamadar1937
3 жыл бұрын
Harry bhaei please dart or flutter pay vedio bna do
@muhammadaarizimam4890
3 жыл бұрын
*Sir please make a complete course on C# programming language.* *Also sir please make a course on game development, but not using softwares like Unity, Unreal, Cry or any other, but using frameworks like Ursina Engine where our code is our game.*
@vsvlog6326
2 жыл бұрын
Congrats for 2.25 millions programer 🥳🥳🎉🎉🎉🎉🎉🎉🎉🎉
@annesyabanerjee1892
3 жыл бұрын
really awesome please complete collection as soon as possible
@ritusharma3632
2 жыл бұрын
removeLastOccurrence -It remove the last occurrence of a element (When traveling from head to tail)
@pulkitpareek
3 жыл бұрын
l1.removeFirstOccurrence(6); नंबर जहां पहली बार आ रहा है वहाँ से उसे हटा देगा l1.removeLastOccurrence(6); नंबर जहां आखिरी बार आ रहा है वहाँ से उसे हटा देगा
@abhishekpundir5941
3 жыл бұрын
Harrry bhai...You are doing such a great job
@raghunathrout6453
4 ай бұрын
Bhai addLast() and addFirst() ab ArrayList mein bhi ageya he..
@shashwatdhingra3580
2 жыл бұрын
poll() -> Remove the head of Linked List and make just second node as a head.
@vivekshah2569
Жыл бұрын
System.out.println(l.contains(500)); // will show true if Linkedlist contains 500 l.remove(2); //if you write only remove then it will remove the first element
@AnandMishra-rn4tp
2 ай бұрын
Sout(l1.size()); - tell number of elements contains in list Output 👇 6
@SpaceTV04
3 жыл бұрын
offer(a) --> add element a at end of list poll() --> return & delete first element of list
@abhinavsrivastava5881
3 жыл бұрын
Harry bhai java deployment through jar ke bare me batao please.
@kranjani3585
2 жыл бұрын
.peek() return element value of head .getLast() return last element of list
@syedmubeen8082
2 жыл бұрын
push() ya first ma element ko add karta hai Like this l1.push(155); l1.removeLastOccurrence(20); ya last Occurrence ko remove karray ga;
@jdgamesandtechnology
3 жыл бұрын
Harry bhai please Unity game development ka series banaaiye
@utarkemarunga
3 жыл бұрын
removeLastOcurrenceOf(Object):yeh method kisi bhi list mein last se search karta hai given element ko aur remove karta hai. set(index,Object): yeh wala method kisi list ke given index mein jo element hai usko given element se replace karta hai. element():yeh wala method kisi linked list ka head element return karta hai.
@royfamily9273
Жыл бұрын
Thanks Harry Bhaiya
@bharatswami6500
2 жыл бұрын
Size() returns size of the array
@Victor-ev3vu
3 жыл бұрын
Please make tutorial on kivy
@Varunk47
2 жыл бұрын
removeLastOccurrence(object o) - linked list ke last occurring element ko delete karta hai. pollFirst() - linked list ke 1st element ko return karke delete karta hai aur agar list empty rahegi to null return karega
@OmGupta
3 жыл бұрын
Just 47k away from 1 million subscribers
@originalpanditji5152
3 жыл бұрын
My first view ever with first like.👍👍
@travelnlearn
2 жыл бұрын
Thanks for this wonderful video. May gbu with lots of success love and life. Keep Rocking
@w.intelli7721
3 жыл бұрын
Thank you harry bhai
@dnyaneshwarigund9616
Жыл бұрын
.element() Return the very first element of LinkedList .poll() Remove first element and return the removed element
@rajatchaurasia3578
3 жыл бұрын
Present sir 👌🏻❤👌🏻❤❤👌🏻
@Prototype.abdullah
Жыл бұрын
Make the video in sevlet session and cookie (Advanced Java)
@sangamchaurasiya6870
3 жыл бұрын
removeFirst() - यह method LinkedList के first element को remove करके return करता है। removeLast() - यह method LinkedList के last element को remove करके return करता है।
Пікірлер: 422