Add office photos
Employer?
Claim Account for FREE

Arista Networks

4.1
based on 74 Reviews
Filter interviews by

Shri Krishnaswamy College Interview Questions and Answers

Updated 31 Oct 2024

Q1. Find the memory of the given structure (Struct padding is the hint)

Ans.

The question asks to find the memory of a given structure by considering struct padding.

  • Struct padding refers to the unused bytes added to align the members of a structure.

  • To find the memory of a structure, we need to consider the size of each member and the padding added.

  • The total memory of a structure is the sum of the sizes of its members and the padding.

Add your answer

Q2. Write code to find the position of a number in a BST

Ans.

Code to find the position of a number in a BST

  • Implement a recursive function to traverse the BST

  • Compare the target number with the current node value

  • If the target is smaller, go to the left subtree; if larger, go to the right subtree

  • Repeat until the target is found or the subtree is null

Add your answer

Q3. Create a Trie data structure and perform insertion and search on it.

Ans.

A Trie is a tree-like data structure used for efficient retrieval of strings. It supports insertion and search operations.

  • A Trie is also known as a prefix tree.

  • Each node in the Trie represents a character.

  • The root node represents an empty string.

  • Each node can have multiple children, each representing a different character.

  • Insertion involves traversing the Trie and creating new nodes as needed.

  • Search involves traversing the Trie and checking if the desired string exists.

  • Tries ...read more

Add your answer

Q4. Internal working of Hashmap in c C++ debugging the code

Ans.

Hashmap in C/C++ stores key-value pairs using a hash function for fast retrieval.

  • Hashmap uses a hash function to map keys to indices in an array.

  • Collision handling is done using techniques like chaining or open addressing.

  • Hashmap allows for fast insertion, deletion, and lookup of key-value pairs.

  • Example: std::unordered_map in C++ implements a hashmap.

  • Debugging hashmap code involves checking hash function, collision resolution, and data retrieval.

Add your answer
Discover Shri Krishnaswamy College interview dos and don'ts from real experiences

Q5. Design a routing table with insert delete and forward functionality. Define its class also

Ans.

Design a routing table with insert, delete, and forward functionality in a defined class.

  • Create a class called RoutingTable with methods for insert, delete, and forward

  • Use a data structure like a hash table or tree to store routing information

  • Implement insert method to add new routes, delete method to remove routes, and forward method to look up and forward packets

Add your answer

Q6. String compare using char pointers

Ans.

Comparing two strings using char pointers in C/C++

  • Use char pointers to iterate through each character of the strings

  • Compare characters at each position until a difference is found

  • Return 0 if strings are equal, -1 if first string is less than second, 1 if first string is greater

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at Shri Krishnaswamy College

based on 23 interviews in the last 1 year
Interview experience
4.0
Good
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Interview Questions from Similar Companies

3.4
 • 488 Interview Questions
4.2
 • 386 Interview Questions
4.0
 • 264 Interview Questions
3.9
 • 186 Interview Questions
4.0
 • 147 Interview Questions
3.4
 • 138 Interview Questions
View all
Top Arista Networks Interview Questions And Answers
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter