Professional Documents
Culture Documents
qustions 1
compund index
multiky index
text index
hashed index
horizontal scaling adds more machines to distribute the load,
vertical scaling increases the resources of a single machine to handle increased load or
data volume
capped collection have a fixed size and limit that automatically overwrites older
documents with new documents when the maximum sotrage limit is reached
Gris fs is a storage mechanism in mongo db which is user to store and retrive
comparitively large size of data
fragment is a component that allows you to group multiple elements together without
adding any wrapping element in the HTML output
it is a tool used to analyze and optimize the perfomance of a react application
loading of a certain components untill they are needed improveing he size like
reduccing the initial bundle size and loading the necessary things
Pure component
Thunk is a middleware library that allow you to write action creators that return fuction
instead of plain objects thunks will handle the asynchronus operation in Redux Saga is
also a middle ware to handle asynchronus operation which use generator fucnction to
handle asynchronus opraions
A generator function is a special type of function in JavaScript that can be paused and
resumed during execution. It allows for the generation of a sequence of values over
time, rather than returning a single value like a regular function.
A Binary tree is a Perfect Binary Tree in which all the internal nodes have two children
and all leaf nodes are at the same level.
A Binary Tree is a Complete Binary Tree if all the levels are completely filled except
possibly the last level and the last level has all keys as left as possible.
qustions 2
A Binary Tree is a full binary tree if every node has 0 or 2 children.
By using min heap and max heap we can apply heap in prioriy queue
Graph indexing refers to creating an index to efficently retirve and query data in a graph
the differnce method using for a graph indexing are Adjececy List adjecency matrix etc..
A spanning tree is a subset of Graph G, which has all the vertices covered with
minimum possible number of edges. Hence, a spanning tree does not have cycles and
it cannot be disconnected.
a minimum spanning tree is a spanning tree that has minimum weight than all other
spanning trees of the same graph.
Cycle detection algorithms, such as Floyd's cycle detection algorithm or depth-
first search, are used to determine whether a Graph contains any cycles.
new
In the context of web development, both "params" and "query" refer to different ways of
passing data in a URL. Here's the difference between the two:
Query parameters are used to pass additional data in the URL for specific requests.
They are appended to the URL after a question mark (?) and separated by ampersands
(&).
Query parameters consist of a key-value pair and are used to modify or filter the
requested resource.
Example: https://example.com/search?q=keyword&category=books, where q and
category are query parameters with respective values.
The main differences between params and query parameters are as follows:
qustions 3
Usage: Params are typically used for specifying identifiers or dynamic segments in the
URL path, while query parameters are used for providing additional information or
modifying a request.
Location: Params are part of the URL path itself, while query parameters are appended
to the URL as key-value pairs.
Syntax: Params are defined within the URL path, typically denoted by a colon (:) or
other placeholders. Query parameters are appended to the URL after a question mark
(?) and separated by ampersands (&).
Encoding: Params are usually URL-encoded to handle special characters and spaces in
the values. Query parameters are also URL-encoded, with special characters encoded
as well.
To summarize, params are used to represent dynamic parts of a URL's path, while
query parameters provide additional data in the URL for filtering, modifying, or
enhancing the request.
Keywords: Reserved words that have a specific meaning in the language and cannot be
used as identifiers
Identifiers: User-defined names used to represent variables, functions, or labels in the
code. Identifiers can consist of letters, digits, underscores, and dollar signs but cannot
start with a digit.
Literals: Fixed values that are directly used in the code.
Escape sequences begin with a backslash \ followed by one or more characters that
have a specific meaning
The Temporal Dead Zone (TDZ) is a period in JavaScript where variables declared with
let and const exist but cannot be accessed until they are formally declared in the code.
Attempting to access them during this period results in a runtime error.
The optional chaining operator is represented by ?. and can be used with object
properties and methods. If the property or method before ?. is null or undefined, the
expression returns undefined, and the evaluation stops there, avoiding any potential
errors.
qustions 4
A pure function is a function in programming that always produces the same output for
the same given input and has no side effects on the program's state or external
environment.
Cookies:
Cookies are small pieces of data stored on the user's browser.
They are used to persistently store information across visits or page requests from the
same user.
Cookies are limited in size (usually around 4KB) and can be accessed by both client-
side (JavaScript) and server-side (web server) code.
Sessions:
Sessions are stored on the server-side.
They manage user-specific data during their visit to a website, typically identified by a
session ID stored in a cookie on the user's browser.
Unlike cookies, session data is not stored on the user's browser; instead, it is stored on
the server, usually in memory or a database.
Sessions can store larger amounts of data compared to cookies since they are not
limited by the size constraints of browser cookies.
REST API is a set of rules and conventions that define how client applications can
request and interact with resources (data or functionalities) hosted on a web server.
qustions 5
These resources are typically represented as URLs (Uniform Resource Locators), and
the communication between clients and servers is done using standard HTTP methods
like GET, POST, PUT, DELETE, etc.
Writable Streams: These streams are used to write data to a destination, such as a file
or an HTTP response. They accept data in chunks, enabling efficient writing of large
datasets.
Duplex Streams: These streams can both read and write data. They combine the
functionalities of Readable and Writable streams and are often used for tasks that
require bidirectional data flow.
Transform Streams: These streams are a special type of duplex stream that allows data
to be modified while being read or written. They are useful for data processing tasks,
such as compression, encryption, or parsing.
qustions 6