Author Archives: qainterviews

About qainterviews

Software Geek,QA Expert,Blogger

Linear Search using Python

”’ Created on Oct 14, 2018 Linear Search using Python @author: asharda ”’ arr = [10, 20, 30] for x in arr: if(x == 10): print(“Number is found”) break else: print(“Number is not found”) Advertisements

Posted in Python, Uncategorized | Leave a comment

File Handling using Python

file_name=input(“Enter file name”) file_n=open(file_name,”r”) strings=file_n.read() print(strings) file_n.close()

Posted in Python, Uncategorized | Leave a comment

GCD using Python

”’ Created on Oct 12, 2018 @author: asharda ”’ from fractions import gcd gcd_p=gcd(12,8) print(gcd_p)

Posted in Data Structures, Python, Uncategorized | Leave a comment

Factorial in Python

”’ Created on Oct 12, 2018 @author: asharda ”’ def factorial(n): if(n==1): return 1 return factorial(n-1)*n print(factorial(6))

Posted in Python, Uncategorized | Leave a comment

Queue in Java

package test5; import java.util.LinkedList; /** * Queues using LinkedList * @author asharda * */ public class Queues { LinkedList<Integer> list=new LinkedList<Integer>(); /** * Enqueue * @param data */ public void enqueue(int data) { list.add(data); } /** * Dequeue * @return … Continue reading

Posted in Data Structures, Java, Java 8, Uncategorized | Leave a comment

Stack using LinkedList in Java

package test5; import java.util.LinkedList; /** * Stack using LinkedList * @author asharda * */ public class Stack { LinkedList<Integer> list=new LinkedList<Integer>(); /** * Push Operation * @param data */ public void push(int data) { list.addFirst(data); } /** * Display contents … Continue reading

Posted in Data Structures, Java, Java 8, Uncategorized | Leave a comment

$ is synonym for JQuery

$ is synonym for JQuery.You can use $(‘p’) or jQuery(‘p’) alternatively.

Posted in Uncategorized | Leave a comment