Skip to main content

Posts

Showing posts with the label CS Concepts

Top 25 Algorithms

  Top 25 Algorithms Searching Linear Search Binary Search Algorithms Breadth First Seartch(BFS) Algorithm Depth First Search(DFS) Algorithm Arrays Kadane's Algorithm Floyd Warshall Algorithm KMP Algorithm Quickselect Algorithm Boyer-Moore Majority Vote Algorithm Sorting Insertion Sort Selection Sort Heap Sort Merge Sort Quick Sort Counting Sort Basic Algorithms Huffman Coding Compression Algorithm Euclid's Algorithm Union Find Algorithm Graphs krushkal's Algorithm Dijkstra's Algorithm Bellman Ford Algorithm Floyd Warshall Algorithm Topological Sort Algorithm Flood Fill Algorithm Lee Algorithm  Note:     Hello Guys, Don't Stop Learning keep Going..............

What is a Data Structure

  Q) What is a Data Structure? A data structure is a way of organizing the data so that the data can be used efficiently. Different kinds of data structures are suitable to different kinds of applications. Example- compiler usually use hash tables to look up identifiers. Q) What is a linear and non-linear data structure? Linear: A data structure is said to be linear if its elements from a sequence or a linear list Example- Array, Linked list. Non-linear: A data structure is said to be non-linear if the traversal of nodes is nonlinear in nature. Example- Graphs and Trees. Q) What is a Linked List and What are its types? A linked list is a linear data staructure (like arrays) where each element is a separate object. Each element (that is node) of a list is comprising of two items- the data and a reference to the next node. Types of Linked List: Singly Linked List: Every node stores address or reference of next node in list and the last node has next address or reference as NULL. Exam...

What is Python

What is Python:          Python is an interpreted, high-level and general-purpose programming language. Python was created by Guido van Rossum and first released in 1991, Python's design philosophy emphasizes code readability with its notable use of significant whitespace. Features: Easy to code. Free and Open source Object-Orinted language GUI Programming Support Portable Scalable Extensible Feature Interpreted language Dynamically typed language Large standard library Cross Platform language Embeddable     Do: 1. Write a Program To Print Given Pattern    1    2  2    3  3  3    4  4  4   4    5  5  5   5   5 Code:   def pattern(n):     x=0     for i in range(n):         x+=1         for j in range(0,i+1):             print(x,end=" ")   ...