Posts

Showing posts from October, 2021

Best sites to learn aptitude and coding questions

Hi Friends, In this post you can get the top sites to learn aptitude questions and coding questions. 1.PrepInsta -  https://prepinsta.com/ 2.IndiaBix -  https://www.indiabix.com/aptitude/questions-and-answers/ 3.JavaTPoint -  https://www.javatpoint.com/aptitude/quantitative 4.CarrerRide -  https://www.careerride.com/ 5.GeeksForGeeks -  https://www.geeksforgeeks.org/placements-gq/ Top YouTube Channels to learn Aptitude and Coding Questions 1.OnilneStudy4u -  https://www.youtube.com/c/OnlineStudy4u 2.Feel Free To Learn -  https://www.youtube.com/c/FeelFreetoLearnBanking 3.CareerRide -  https://www.youtube.com/c/CareerRideinfo 4.CareerVidz -  https://www.youtube.com/user/CareerVidz 5.Simplileran -  https://www.youtube.com/user/Simplilearn 6.Edureka -  https://www.youtube.com/c/edurekaIN 7.PrepInsta -  https://www.youtube.com/c/PrepInsta Top sites to practice coding questions  1.HackerRank -  https://www.hackerrank.com/ 2.LeetCode -  https://leetcode.com/ 3.TopCoder -  https://www.topcoder

Stack Implementation using Python

 Code is given below: #Stack class stack:     def __init__(self):         self.stack=[]     def push(self,value):         if value not in self.stack:             self.stack.append(value)         else:             print("Data is already there in stack...")     def pop(self):         if self.stack is None:             print("Stack is empty")         else:             self.stack.pop()             print("Popped Successfully")     def display(self):         for i in range(len(self.stack)-1,-1,-1):             print(self.stack[i])              obj=stack() print("STACK OPERATIONS") while True:     print("\nPress\n1.PUSH\n2.POP\n3.DISPLAY\n4.EXIT")     choice=int(input("Enter your choice : "))     if choice==1:         number=int(input("Enter the number : "))         obj.push(number)     elif choice==2:         obj.pop()     elif choice==3:         obj.display()     elif choice==4:         break     else:         pass

Queue Implementation using Python

Code is given below. #QUEUE  class queue:     def __init__(self):         self.l1=[]              def add(self,data):         if data not in self.l1:             self.l1.append(data)         else:             print("Data is alreday there in queue....")     def remove(self):         self.l1.pop(0)          def display(self):         for i in self.l1:             print(i,end=' ')         print() A=queue() while True:     print("\nPress\n1.ADD ITEM\n2.REMOVE\n3.DISPLAY\n4.EXIT\n")     ch=int(input("Enter your choice : "))     if ch==1:         number=int(input("Enter the number : "))         A.add(number)     elif ch==2:         A.remove()     elif ch==3:         print("Queue Elements are....")         A.display()     elif ch==4:         break #Doble Ended Queue class doubleEndedQueue:     def __init__(self):         self.l1=[]              def addAtFront(self,data):         if data not in self.l1:             self.l1.insert(0,data