Cisco Topics for Interview Preparation Last Updated : 26 Jun, 2024 Comments Improve Suggest changes Like Article Like Report Easy LevelBubble SortCount set bits in an integerFind the Missing NumberHow to check if a given array represents a Binary Heap?Level Order Tree TraversalWrite a program to print all permutations of a given stringInsertion SortReverse words in a given stringSorted Array to Balanced BSTWrite a function to reverse a linked listMedium Level Greedy Algorithms | Set 5 (Prim’s Minimum Spanning Tree (MST))Greedy Algorithms | Set 7 (Dijkstra's shortest path algorithm)K'th largest element in a stream Comment More infoAdvertise with us Next Article Find the Missing Number K kartik Follow Improve Article Tags : Interview Experiences Cisco Practice Tags : Cisco Similar Reads Insertion Sort Algorithm Insertion sort is a simple sorting algorithm that works by iteratively inserting each element of an unsorted list into its correct position in a sorted portion of the list. It is like sorting playing cards in your hands. You split the cards into two groups: the sorted cards and the unsorted cards. T 9 min read Dijkstra's Algorithm to find Shortest Paths from a Source to all Given a weighted undirected graph represented as an edge list and a source vertex src, find the shortest path distances from the source vertex to all other vertices in the graph. The graph contains V vertices, numbered from 0 to V - 1.Note: The given graph does not contain any negative edge. Example 12 min read Primâs Algorithm for Minimum Spanning Tree (MST) Primâs algorithm is a Greedy algorithm like Kruskal's algorithm. This algorithm always starts with a single node and moves through several adjacent nodes, in order to explore all of the connected edges along the way.The algorithm starts with an empty spanning tree. The idea is to maintain two sets o 15+ min read Level Order Traversal (Breadth First Search or BFS) of Binary Tree Given a Binary Tree, the task is to find its Level Order Traversal. Level Order Traversal technique is a method to traverse a Tree such that all nodes present in the same level are traversed completely before traversing the next level.Example:Input: Output: [[5], [12, 13], [7, 14, 2], [17, 23, 27, 3 14 min read Find the Missing Number Given an array arr[] of size n-1 with distinct integers in the range of [1, n]. This array represents a permutation of the integers from 1 to n with one element missing. Find the missing element in the array.Examples: Input: arr[] = [8, 2, 4, 5, 3, 7, 1]Output: 6Explanation: All the numbers from 1 t 12 min read Topic wise multiple choice questions in computer science We have covered multiple choice questions on several computer science topics like C programming, algorithms, data structures, computer networks, aptitude mock tests, etc. Practice for computer science topics by solving these practice mcq questions.This page specifically covers a lot of questions and 2 min read Reverse words in a string Given a string str, find a way to reverse the order of the words in the given string. Note: str may contain leading or trailing dots(.) or multiple trailing dots(.) between two words. The returned string should only have a single dot(.) separating the words.Examples:Input: str = "i.like.this.program 11 min read Permutations of given String Given a string s, the task is to return all permutations of a given string in lexicographically sorted order.Note: A permutation is the rearrangement of all the elements of a string. Duplicate arrangement can exist.Examples:Input: s = "ABC"Output: "ABC", "ACB", "BAC", "BCA", "CAB", "CBA"Input: s = " 5 min read Infosys Interview Experience | SP I have applied on off-campus in June month of 2024. After 3-4 weeks, I get emails of the Shortlisted for the online test under the Infosys Campus Recruitment Program. The test date is 6 July 2024. so Infosys SP hiring asks for 3 Problems related to Data Structure and Algorithms (DSA). Problem Levels 4 min read Count set bits in an integer Write an efficient program to count the number of 1s in the binary representation of an integer.Examples : Input : n = 6Output : 2Binary representation of 6 is 110 and has 2 set bitsInput : n = 13Output : 3Binary representation of 13 is 1101 and has 3 set bits[Naive Approach] - One by One CountingTh 15+ min read Like