Code Pumpkin

ServiceNow Interview Questions Set 1

May 13, 2018
Posted by Pumpkin

First Round (Programming round at HackerEarth)

I have participated in ServiceNow Developer Hiring Challenge conducted on HackerEarth. There were two programming questions in this challenge and I was able to solve both of them. Both of these problems are now present in Hacker Earth practice section. 


Second Round (Technical Telephonic Round)

After few days, I got a call from  ServiceNow HR and they have scheduled telephonic round (Duration 1:30 hr) Here are the list of questions : 

  1. Simple Introduction
  2. Java questions on Inheritance and Polymorphism.
  3. Implement playSongs() method of class MediaPlayer to play songs in shuffle mode. Each song should be played only once and in random order. Once all the songs are played the method should exit.

class MediaPlayer {
	public void playSongs(Song[] songArray) {
		// Implement you code here
	}
}

class Song {
	
	// constructor and private methods
	
	/**
	 * Only public method of class Song
	 */
	public void play() {
		// Some code to play song
	}
}

Note : You need to call play() method of Song class to play each song. All other methods of class Song is private and not accessible from outside the class.

  1. Design application like Splitwise.
    – List down design patterns and data structures which you will use in this application.
    – Also write method to minimize the number of transactions in a group. (Like 'Simplify Group Debts' in Splitwise) 
  2. Few Object Oriented Principles like Composition, Aggregation, Cohesion 
  3. Few general questions like, what is ITSM domain

This article is contributed anonymously by one of the CodePumpkin user. If you would also like to contribute your article or share interview experiences, you can create contributor account with CodePumpkin by clicking here or you can send us a mail at admin@codepumpkin.com.

That's all for this topic. If you guys have any suggestions or queries, feel free to drop a comment. We would be happy to add that in our post. You can also contribute your articles by creating contributor account here.

Happy Learning 🙂

If you like the content on CodePumpkin and if you wish to do something for the community and the planet Earth, you can donate to our campaign for planting more trees at CodePumpkin Cauvery Calling Campaign.

We may not get time to plant a tree, but we can definitely donate ₹42 per Tree.



About the Author


A Blog that will help you to learn and refresh your knowledge on Core Java, Data Structure, algorithms, Design Patterns.



Tags: , , ,


Comments and Queries

If you want someone to read your code, please put the code inside <pre><code> and </code></pre> tags. For example:
<pre><code class="java"> 
String foo = "bar";
</code></pre>
For more information on supported HTML tags in disqus comment, click here.
Total Posts : 124
follow us in feedly

Like Us On Facebook