RUVIDEO
Поделитесь видео 🙏

Python Practice Queue Linked List || Lesson 26 || Python Placements || Learning Monkey ||

📁 Обучение 👁️ 16 📅 02.12.2023

#pytho #learningmonke #pythoncodin #placement #pythontutorial #pythoncours #pythonforbeginner #pythonfordatascienc #pythonfullcours #pythonprogrammin #pythonfreecourse
Python Practice Queue Linked List
In this class, we make Python Practice Queue Linked List.
Queue Example
# What will be returned by the following function check_num when the number passed is 125?
Queue class is provided with methods required

def check_num(number):
queue=Queue(5)
outpu=0
out_queue=Queue(5)
Out_queue.enque(1)
while(numbergt0):
queue.enque(number%10)#enque method will insert element in the queue
number//10
while(not queue.isempty()):
val=queue.deque()
output=output+(val*val)
num=out_queue.deque()
if output%2==0:
out_queue.enque(output+num)
else:
out_queue.enque(val+num)
return out_queue

The reader should have basics on Data Structures and python.
For Data structure, please check our Data structures course.
For python, click here.
All these examples will help you improve your coding skill and easily crack the placement exams.
In the above program, a queue class is provided, and the methods are written.
The description of methods is provided in the program.
Intuition on how data structures are implemented in python is provided here.
Step by step explanation of the program is given in the video.
Linked List Example
consider the below input_linked_list
input_linked_list(Head to Tail): 'p'-1-'L'-2

What will be the content of input_linked_list
after executing the below function
if input_linked_list and str1='P' are passed as parameters

def modifylinkedlist(input_linked_list,str1):
temp=input_linked_list.gethead() #gethead() will return head node
while(temp.getnext().getnext()!=None): #getnext() return next node
if str1 in temp.getnext().getdata(): #getdata return the data in node
input_linked_list.add(temp.getdata()) # add will add node at end
temp=temp.getnext()
elif (temp.getdata(isdigit())):
input_linked_list.add(temp.getdata())
temp=temp.getnext()
return input_linked_list()

In the above program linked list object is given as input to the function.
We can use the methods available on the linked list and other classes mentioned in the program.
Description About methods is provided in the program.
A complete explanation is provided in the video.


Link for playlists:
https://www.youtube.com/channel/UCl8x4Pn9Mnh_C1fue-Yndig/playlists


Link for our website: https://learningmonkey.in

Follow us on Facebook @ https://www.facebook.com/learningmonkey

Follow us on Instagram @ https://www.instagram.com/learningmonkey1/

Follow us on Twitter @ https://twitter.com/_learningmonkey

Mail us @ [email protected]

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Python Practice Queue Linked List || Lesson 26 || Python Placements || Learning Monkey ||», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.

Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!

Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.