Full Stack Developer
100+ Full Stack Developer Interview Questions and Answers for Freshers
Q51. Alien Dictionary Problem Statement
You are provided with a sorted dictionary (by lexical order) in an alien language. Your task is to determine the character order of the alien language from this dictionary. Th...read more
Given a sorted alien dictionary in an array of strings, determine the character order of the alien language.
Iterate through the words in the dictionary to build a graph of character dependencies.
Perform a topological sort on the graph to determine the character order.
Return the character array representing the order of characters in the alien language.
Q52. Buy and Sell Stock - III Problem Statement
Given an array prices
where the ith element represents the price of a stock on the ith day, your task is to determine the maximum profit that can be achieved at the en...read more
Determine the maximum profit that can be achieved by selling stocks with at most two transactions.
Iterate through the array and calculate the maximum profit that can be achieved by selling stocks at each day.
Keep track of the maximum profit after the first transaction and the maximum profit after the second transaction.
Return the maximum profit that can be achieved overall.
Q53. Determine the Left View of a Binary Tree
You are given a binary tree of integers. Your task is to determine the left view of the binary tree. The left view consists of nodes that are visible when the tree is vi...read more
The task is to determine the left view of a binary tree, which consists of nodes visible when viewed from the left side.
Traverse the binary tree level by level from left to right, keeping track of the first node encountered at each level.
Use a queue to perform level order traversal and keep track of the level number for each node.
Store the first node encountered at each level in a result array to get the left view of the binary tree.
Q54. Smallest Window Problem Statement
Given two strings, S
and X
, your task is to find the smallest substring in S
that contains all the characters present in X
.
Example:
Input:
S = "abdd", X = "bd"
Output:
"bd"
Ex...read more
Find the smallest substring in a given string that contains all characters present in another string.
Use a sliding window approach to find the smallest window in S that contains all characters in X
Keep track of the characters in X using a hashmap
Move the window by adjusting the start and end pointers
Return the smallest window found
Q55. Group Anagrams Problem Statement
Given an array or list of strings called inputStr
, your task is to return the strings grouped as anagrams. Each group should contain strings that are anagrams of one another.
An...read more
Group anagrams in an array of strings based on their characters.
Iterate through each string in the input array
Sort the characters of each string and use the sorted string as a key in a hashmap to group anagrams
Return the values of the hashmap as the grouped anagrams
Q56. Problem: Ninja's Robot
The Ninja has a robot which navigates an infinite number line starting at position 0 with an initial speed of +1. The robot follows a set of instructions which includes ‘A’ (Accelerate) a...read more
Determine the minimum length of instruction sequence for a robot to reach a given target on an infinite number line.
Start at position 0 with speed +1, update position and speed based on 'A' and 'R' instructions
For each test case, find the shortest sequence of instructions to reach the target
Consider both positive and negative positions for the robot
Return the minimum length of instruction sequence for each test case
Share interview questions and help millions of jobseekers 🌟
Q57. Remove Character from String Problem Statement
Given a string str
and a character 'X', develop a function to eliminate all instances of 'X' from str
and return the resulting string.
Input:
The first line contai...read more
Develop a function to remove all instances of a given character from a string.
Create a function that takes the input string and character to be removed as parameters.
Iterate through each character in the input string and only add characters that are not equal to the given character to a new string.
Return the new string as the output.
Handle edge cases such as empty input string or character.
Example: Input string 'hello world' and character 'o' should return 'hell wrld'.
Q58. Valid Parentheses Problem Statement
Given a string 'STR' consisting solely of the characters “{”, “}”, “(”, “)”, “[” and “]”, determine if the parentheses are balanced.
Input:
The first line contains an integer...read more
The task is to determine if a given string of parentheses is balanced or not.
Iterate through each character in the string and use a stack to keep track of opening parentheses
If a closing parenthesis is encountered, check if it matches the top of the stack. If not, the string is not balanced
If all parentheses are matched correctly and the stack is empty at the end, the string is balanced
Full Stack Developer Jobs
Q59. Tiling Problem Statement
Given a board with 2 rows and N columns, and an infinite supply of 2x1 tiles, determine the number of distinct ways to completely cover the board using these tiles.
You can place each t...read more
The problem involves finding the number of ways to tile a 2xN board using 2x1 tiles.
Use dynamic programming to solve the problem efficiently.
Consider the base cases for N=1 and N=2 to build up the solution for larger N.
Implement a recursive function with memoization to avoid redundant calculations.
Keep track of the number of ways modulo 10^9 + 7 to handle large values of N.
Test the solution with different values of N to ensure correctness.
Prisoners must devise a strategy to guess the color of their own hat based on the hats of others.
Prisoners can agree on a strategy before the hats are assigned.
One strategy is for each prisoner to count the number of hats of a certain color and use that information to guess their own hat color.
Another strategy involves using parity to determine the color of their own hat.
Prisoners can also use a signaling system to convey information about their hat color to others.
Mutex and Semaphore are synchronization mechanisms used in operating systems to control access to shared resources.
Mutex is used to provide mutual exclusion, allowing only one thread to access a resource at a time.
Semaphore is used to control access to a resource by multiple threads, with a specified number of permits available.
Mutex is binary in nature (locked or unlocked), while Semaphore can have a count greater than 1.
Example: Mutex can be used to protect critical section...read more
Yes, a singleton class is a class that can only have one instance created.
Ensure the constructor is private to prevent external instantiation.
Provide a static method to access the single instance.
Use a static variable to hold the single instance.
Example: class Singleton { private static Singleton instance = new Singleton(); private Singleton(){} public static Singleton getInstance() { return instance; }}
Q63. How will you schedule tasks to CPUs based on there priorities ?
CPU scheduling is done using algorithms like FCFS, SJF, RR, etc. based on priority and burst time.
Priorities are assigned to tasks based on their importance and urgency
FCFS (First Come First Serve) algorithm schedules tasks in the order they arrive
SJF (Shortest Job First) algorithm schedules tasks with the shortest burst time first
RR (Round Robin) algorithm schedules tasks in a circular queue with a fixed time slice
Priority scheduling algorithm schedules tasks based on their ...read more
CPU scheduling algorithms determine the order in which processes are executed by the CPU.
First Come First Serve (FCFS) - Processes are executed in the order they arrive.
Shortest Job Next (SJN) - Process with the shortest burst time is executed next.
Round Robin (RR) - Each process is given a small unit of time to execute in a cyclic manner.
Priority Scheduling - Processes are executed based on priority levels assigned to them.
Multi-Level Queue Scheduling - Processes are divided...read more
Q65. diff between abstract and interface, method overloading, overriding, microservices, how do microservice communicate
Abstract class is a class that cannot be instantiated, while an interface is a blueprint of a class with only abstract methods.
Abstract class cannot be instantiated, but can have both abstract and non-abstract methods.
Interface can only have abstract methods and cannot have method implementations.
Method overloading is having multiple methods in the same class with the same name but different parameters.
Method overriding is implementing a method in a subclass that is already p...read more
Q66. Write a function to return an Object when the given params are an Object and an array containing the keys.
Function to return an Object using given Object and array of keys.
Create a function that takes an Object and an array of keys as parameters.
Iterate through the array of keys and check if each key exists in the Object.
Create a new Object with the keys and corresponding values from the original Object.
Q67. Print prime numbers between 10-30 and store them in an array
Generate prime numbers between 10-30 and store in an array
Iterate through numbers 10 to 30
Check if each number is prime
Store prime numbers in an array
Q68. What is React, and how does it relate to JavaScript?
React is a JavaScript library for building user interfaces, commonly used for creating interactive web applications.
React is a front-end library developed by Facebook.
It allows developers to create reusable UI components.
React uses a virtual DOM to improve performance by only updating the necessary parts of the actual DOM.
React can be used with JavaScript to create dynamic and interactive web applications.
React components are written in JSX, a syntax extension for JavaScript.
Q69. How would you declare an array in JavaScript
To declare an array in JavaScript, use square brackets and separate elements with commas.
Declare an array of strings: let myArray = ['apple', 'banana', 'orange'];
Access elements by index: myArray[0] will return 'apple'.
Add elements to the array: myArray.push('grape');
Get the length of the array: myArray.length will return 4.
Q70. What are Schema, Indexes, Event Loop, etc.
Schema defines the structure of a database, Indexes improve query performance, Event Loop manages asynchronous operations.
Schema is a blueprint of a database that defines tables, columns, relationships, etc.
Indexes are data structures that improve query performance by allowing faster data retrieval.
Event Loop is a mechanism that manages asynchronous operations in JavaScript.
Other important concepts for Full Stack Developers include REST APIs, MVC architecture, and version con...read more
Q71. Write a O(N) function to return the second largest number in an array(Only in JS)
Write a O(N) function to return the second largest number in an array in JavaScript.
Iterate through the array and keep track of the largest and second largest numbers.
Handle edge cases like when the array has less than 2 elements.
Return the second largest number found.
Q72. Explain the qualities that should be possessed by Full Stack Developer
A Full Stack Developer should possess a combination of technical skills, problem-solving abilities, and strong communication skills.
Proficiency in both front-end and back-end technologies
Strong understanding of databases and server-side languages
Ability to work independently and in a team
Good problem-solving skills and attention to detail
Effective communication and collaboration with other team members
Continuous learning and staying updated with new technologies
Q73. Do you like data structure and algorithms?
Yes, I enjoy working with data structures and algorithms.
I find data structures and algorithms fascinating and enjoy solving problems using them.
I have experience implementing various data structures like arrays, linked lists, stacks, queues, trees, and graphs.
I am familiar with common algorithms such as sorting, searching, and graph traversal algorithms.
I understand the importance of choosing the right data structure and algorithm for efficient and optimized solutions.
I have...read more
Q74. Coding question Consecutive 1's not allowed in binary string
Write a function to generate binary strings without consecutive 1's.
Use dynamic programming to keep track of previous two states
Start with base cases of 0 and 1
For each new bit, check if adding it would create consecutive 1's
If not, add it to the string and update the previous two states
Repeat until desired length is reached
Q75. Statefull and StateLess components explaination
Stateful components store and manage state data, while stateless components do not store state data.
Stateful components have internal state data that can change over time, while stateless components rely on props passed down from parent components.
Stateful components are typically class components in React, while stateless components are functional components.
Examples of stateful components include forms, modals, and sliders, while examples of stateless components include but...read more
Q76. Why Reactjs is used nowadays or prefered nowadays?
Reactjs is preferred nowadays due to its component-based architecture, virtual DOM for efficient updates, and strong community support.
Component-based architecture allows for reusability and easier maintenance of code.
Virtual DOM enables efficient updates by only re-rendering components that have changed.
Strong community support provides a wealth of resources, libraries, and tools for developers.
React's declarative approach simplifies the process of building complex user inte...read more
Q77. what are tags and attributes in html?
Tags and attributes are essential components of HTML for structuring and styling web content.
Tags are used to define different elements on a webpage, such as headings, paragraphs, images, etc.
Attributes provide additional information about an element, like specifying its color, size, alignment, etc.
Example: <h1> is a tag used for defining a top-level heading, and style='color: red;' is an attribute to change its color.
Q78. what is the purpose of a round?
A round is a circular object or a series of actions that lead back to the starting point.
A round can refer to a circular object, such as a ball or a wheel.
In music, a round is a song where different groups start singing the same melody at different times, creating a harmonious effect.
In sports, a round can refer to a single game or match in a tournament.
In conversation, a round can refer to each person taking a turn to speak or share their thoughts.
In programming, rounding is...read more
Q79. what is LRU cache and where to use it ?
LRU cache is a data structure that stores recently used items and discards the least recently used item when the cache is full.
LRU stands for Least Recently Used
It is used to improve the performance of applications by reducing the number of disk reads or network calls
It is commonly used in web browsers, databases, and operating systems
It can be implemented using a hash table and a doubly linked list
When an item is accessed, it is moved to the front of the list. When the cache...read more
Q80. Why java is not 100% Object oriented?
Java is not 100% Object oriented because it supports primitive data types which are not objects.
Java has primitive data types like int, float, boolean which are not objects.
These primitive data types do not have methods or inheritance like objects.
For example, int i = 5; does not have any methods associated with it.
Q81. Can we use async without await
Yes, async can be used without await.
Async functions return a promise, which can be handled without using await.
Using async without await can be useful for error handling or logging.
However, it is important to handle the promise returned by the async function.
Q82. Remove duplicates without using inbuilt methods
Removing duplicates without using inbuilt methods in JavaScript
Create an empty array to store unique values
Loop through the original array
Check if the current element exists in the unique array
If not, push it to the unique array
Return the unique array
Q83. Create a database design for online course management.
Database design for online course management system
Create tables for courses, students, instructors, enrollments, and assignments
Use relationships like one-to-many between courses and students, many-to-many between courses and instructors
Include fields like course name, instructor name, student name, enrollment date, assignment details
Consider using primary keys, foreign keys, and indexes for efficient data retrieval
Q84. What is Middleware? what is its purpose?
Middleware is software that acts as a bridge between different applications or components, allowing them to communicate and share data.
Middleware helps in integrating different systems and applications by providing a common platform for communication.
It can handle tasks such as data transformation, security, logging, and error handling.
Examples of middleware include web servers like Apache or Nginx, messaging systems like RabbitMQ, and API gateways like Kong.
Q85. What is 40-30-30 rule in UI development?
The 40-30-30 rule in UI development refers to the ideal distribution of time spent on design, development, and testing.
40% of time should be spent on design, including wireframing, prototyping, and creating mockups
30% of time should be spent on development, implementing the design using code and programming languages
30% of time should be spent on testing, including unit testing, integration testing, and user acceptance testing
Q86. what is eloquent in laravel framework
Eloquent is Laravel's ORM (Object Relational Mapping) that simplifies database operations.
Eloquent provides an easy-to-use syntax for querying the database.
It allows defining relationships between database tables.
Eloquent supports soft deletes, eager loading, and more.
Example: User::where('name', 'John')->first() retrieves the first user with name John.
Q87. Fundamental concepts in programming,
Fundamental concepts in programming include variables, data types, control structures, functions, and algorithms.
Variables store data for manipulation
Data types define the kind of data that can be stored
Control structures determine the flow of a program
Functions are reusable blocks of code
Algorithms are step-by-step procedures for solving problems
Q88. what is difference between ORM and JPA
JPA is a specification for ORM in Java, while ORM is a technique for mapping objects to relational databases.
JPA is a Java specification for ORM, while ORM is a technique for mapping objects to relational databases
ORM is a general concept, while JPA is a specific implementation of ORM for Java
JPA provides a set of interfaces and annotations for mapping Java objects to relational databases
ORM frameworks like Hibernate, TopLink, and iBatis can be used with JPA
Q89. Which java version we use in present
The current version of Java is Java 17.
Java 17 was released on September 14, 2021.
It is a long-term support (LTS) release.
It introduced new features like sealed classes, pattern matching for switch statements, and more.
Previous versions include Java 16, Java 15, and so on.
Q90. Explain Html css and javascript with syntax?
HTML, CSS, and JavaScript are the building blocks of web development.
HTML (Hypertext Markup Language) is used for creating the structure of a webpage.
CSS (Cascading Style Sheets) is used for styling the HTML elements.
JavaScript is a programming language used for adding interactivity to web pages.
Example: <html><head><style>body {color: blue;}</style></head><body><h1>Hello World!</h1><script>document.getElementById('demo').innerHTML = 'Hello JavaScript!';</script></body></html...read more
Q91. What is promise in angular js?
A promise in AngularJS is an object that represents the result of an asynchronous operation.
Promises are used to handle asynchronous operations in AngularJS
They are objects that represent the eventual completion or failure of an asynchronous operation and its resulting value
Promises can be created using the $q service in AngularJS
They have methods like then(), catch(), and finally() to handle the success, error, and completion of the promise
Promises can be chained together to...read more
Q92. what is html and css?
HTML and CSS are the building blocks of web development, with HTML providing the structure of a webpage and CSS styling its appearance.
HTML stands for HyperText Markup Language and is used to create the structure of a webpage.
CSS stands for Cascading Style Sheets and is used to style the appearance of a webpage.
HTML uses tags to define elements like headings, paragraphs, images, and links.
CSS allows for the customization of colors, fonts, layouts, and more on a webpage.
Both H...read more
Q93. What is IOC container?
An IOC container is a software component that manages the dependencies between objects.
IOC stands for Inversion of Control
It is used to decouple the application components
It creates and manages objects and their dependencies
It allows for easy testing and maintenance of the application
Examples of IOC containers include Spring, Unity, and Autofac
Q94. Explained Company policies
Company policies are guidelines and rules set by the company to govern the behavior and actions of employees.
Company policies outline expectations for employee conduct
They cover areas such as attendance, dress code, communication, and use of company resources
Policies are typically documented in an employee handbook or on the company intranet
Employees are expected to adhere to company policies to maintain a positive work environment
Q95. Tell me about truncate in data base
Truncate is a SQL command used to quickly delete all records from a table without logging individual row deletions.
Truncate is faster than using DELETE statement as it does not log individual row deletions.
Truncate resets the auto-increment value of the table.
Truncate is a DDL (Data Definition Language) command and cannot be rolled back.
Truncate does not activate triggers on the table.
Example: TRUNCATE TABLE table_name;
Q96. What is jQuery , explain it
jQuery is a fast, small, and feature-rich JavaScript library.
jQuery simplifies HTML document traversing, event handling, and animating.
It provides a simple API for AJAX requests and DOM manipulation.
It is cross-platform and supports a wide range of browsers.
It is open-source and has a large community of developers.
Example: $('button').click(function(){ alert('Hello World!'); });
Q97. Tell me about oops concepts
OOPs concepts are the fundamental principles of object-oriented programming.
Encapsulation - binding data and functions together
Inheritance - acquiring properties and behavior of parent class
Polymorphism - ability to take multiple forms
Abstraction - hiding implementation details
Example: A car is an object that encapsulates data like speed and functions like accelerate and brake
Example: A child class inherits properties and behavior from a parent class
Example: A function can ta...read more
Q98. Create form a to console.log input value
Create a form and log input value to console
Create an HTML form element with input field
Add an event listener to the form submit event
Retrieve the input value using JavaScript
Log the input value to console
Q99. What is meant by full stack
Full stack refers to the development of both front-end and back-end portions of a web application.
Full stack developers are proficient in both front-end and back-end technologies
They can handle databases, servers, systems engineering, and clients
Examples of full stack technologies include HTML, CSS, JavaScript, Node.js, React, and Angular
Q100. What is MVC pattern in laravel
MVC pattern is a software design pattern used in Laravel to separate application logic from presentation.
MVC stands for Model-View-Controller
Model represents the data and business logic
View represents the user interface
Controller handles user requests and updates the model and view accordingly
Laravel uses Blade templating engine for views
MVC pattern helps in organizing code and making it more maintainable
Interview Questions of Similar Designations
Top Interview Questions for Full Stack Developer Related Skills
Interview experiences of popular companies
Calculate your in-hand salary
Confused about how your in-hand salary is calculated? Enter your annual salary (CTC) and get your in-hand salary
Reviews
Interviews
Salaries
Users/Month