While creating a gmail account, it asks us to enter the username. When we enter the username and password, then we click the Next Button. Within couple of seconds it gives the error like "That user...

Problem:

Given a group of numbers of length n (sorted), each number is the location of a house in a 1D line "city".

Given a number k<=n, you need to place k "supermarkets" on the 1D city.

For

There are N (N <= 50) codewords representing different letters, (e.g. "000110", "0", etc). And they will form a list:

(e.g "0110","00","111","

In my application (based on Unity3D) meshes are loaded at runtime. In some meshes all faces are flipped (see picture 1).

I tried to implement a simple algorithm that calculates the center of all ve...

Given an array a1,a2,a3

.. an of size n. With value as ai = i.In one second we can take any two of them and take lcm(ai,aj). We have to find minimum time to make array equal. Can anyone help what

The below images show a Union find Problem solved by rank with path compression. If you don't understand my handwriting then read the description below to understand what I have done.

Description:

...

I am trying to figure out what is the best way to sum up all the same item's quantities specifically the data is formed like below:

data = [

{Item Name: Item 2, Quantity: 1},

{...

Imagine having āNā rectilinear blocks of varying sizes. 'N' can be any number (< 1000); and of different sizes, but of similar size.

'N' rectilinear blocks

I need an algorithm that will place t...

I am trying to find an algorithm that would help me do this, but everything I find is very complicated and hard to write. Is there any simpler way to do it?

Came up with this question but I can't figure out if this has a non brute force answer.

What is the most optimal solution for the below question?

Consider two arrays of strings,

Array1 = ['2','3','...

I stumbled upon an algorithm problem of which I want an optimised approach.

Here goes,

Suppose I have a linked-list which is sorted. Each element of the linked list may have a down pointer which

I tried finding the difference between m way tree and the m way search tree. Most resources only tells about m way search tree and end up being on B tree or B+ trees.

My doubts are:-

Is it analogo...

I want to compare two 2D paths (arrays of points) for similarity, and, if possible, get a percentage of how similar the paths are (100% is identical, 0% completely different)

A path in this case is...

Recently I started studying sorting algorithms again and I was wondering which algorithmic paradigm category would better describe the insertion sort. I have researched the web to link the insertio...

Given an array nums of n integers where n > 1, return an array output such that output[i] is equal to the product of all the elements of nums except nums[i].

Example:

Input: [1,2,3,4]

Output...

Im trying to create an application that would form a team of 4 people in a shooter game.

There are 3 roles for 4 players. We need 2x assault, 1x sniper and 1x medic in a team.

I would be choosing p...

Given a graph I want to select cycles in the graph such that

They are edge disjoint, may not be vertex disjoint.

Their combined length is as much as possible.

Any tip will help.

Thanks.

Problem: Given a 2d matrix of item weights, their respective costs in another 2d matrix and max capacity W. Find the optimal selection such that profit is maximum(i.e sum of costs is maximum) and ...

I have been struggling with the below hackerEarth issue since morning and wouldn't know what is wrong.

Could you point to the mistake in the code?

In a cubical pattern, lowermost and uppermost layers

I have read many topics which people usually say that Selection sort's complexity in best case is still O(n^2). But I coundn't be convinced by those ideas.

For instance, I want to sort the array in

I am trying to make my own version of mergesort, however, I am kind of stuck on how to merge two array back into a single array with a sequenced order.

Below is my code, after I try to run the prog...

i write a matlab code about the CFOA algorithm for using to optimize dimensions of a QUASI-YAGI (length , width , distance for directors) antenna simulated in hfss , but i have problem about how i ...

Problem Statement

I have two different patterns to represent whole numbers using binary digits as follows:

First (the standard decimal to binary conversion):

0 -> 000

1 -> 001

2 -> 010

3 -...

Hey I've hit rock bottom trying to solve this. I am trying to sort an array by moving the terminal point elements only efficiently.

For example if the array is 2431, cut 1 paste before 2, cut 3 paste

I have been reading about union-find problem. The two main improvements are path compression and union by rank. As far as I understand union by rank is used to determine how to combine disjoint tre...

I have a 2x2 matrix M which is in general complex. What is the quickest way to multiply M by itself n times, i.e. M^n? I can think of two ways:

A. diagonalize it and multiply them

B. Break up n i...

I need an algorithm with some data structure in Python that at every step when two new elements e1, e2 are given:

finds the insertion positions (conserving the order) of the first and the second g...

I read Mark Adler's explanation (here and here) of how crc32_combine uses a math trick to compute the effect of feeding one zero bit into the CRC32 state machine in O(log(n)) time, with a 32x32 mat...

While learning flutter I have made a game Rabbit and maze which you can access from this link.

Game description: There is 5 type of tiles in the game: Plus(+) shaped have four ways(or openings), T-...

Given an N X M binary matrix ( every element is either 1 or 0) , find the minimum number of moves to convert it to an all 0 matrix.

For converting a matrix, one can choose squares of any size and

I've trained a linear SVM classifier using the Classification Learner app, and exported the model to a .mat file. I'm attempting to translate this algorithm to C using MATLAB Coder, but am getting an

What is a way that I can calculate the width of a convex polygon given its vertices and some angle? The purpose of this is to find the cross sectional width of a polygon moving at some velocity in ...

I have a system with a small number of particles (4-10) at fixed locations in space. I then have a single target location. I would like to assign weights to each particle so that the weighted avera...

I am looking for algorithm that will let me thicken given polyline -- or algorithm that will create a second polyline, which could be thought as left/right boundary of the "thick line".

The input is

For each function f(n) and time t, determine the largest size n of a problem that can be solved in time t,

where f(n)=t sec.

For the above question, I have to solve for f(n)=nlogn

that means nl...

Big theta which says it's both big o and big omega. As I understand big o is the upper bound that means for any large input the complexity should not exceed big o and the opposite for big omega. Ho...

How is it different from asymptotic analysis? When do you use it, and why?

I've read some articles that seem to have been written well, like these:

http://www.ugrad.cs.ubc.ca/~cs320/2010W2/handou...

Floating point numbers are not exact due to its limited precision. My question is: is multiplication commutative in floating number computer calculation?

For example

double a = ..;

double b = ...;

I need to implement a simple macro that finds the modulo of two numbers on a processor that doesn't have a division operator (think ARM). I could use division by repeated subtraction, but I don't k...

I have a situation where I'm performing a calculate over a huge number of rows, and I can really increase the performance if I can eschew a conditional statement.

What I need is for a given positi...

Very simply, what is tail-call optimization?

More specifically, what are some small code snippets where it could be applied, and where not, with an explanation of why?

I have been looking for the way that integers are converted to characters. I understand that there are ways using modulo and division to extract each number. I am looking for the way that programming

John Carmack has a special function in the Quake III source code which calculates the inverse square root of a float, 4x faster than regular (float)(1.0/sqrt(x)), including a strange 0x5f3759df con...

.htaccess
.net
.net-core
2d
3d
3d-printing
abp
abstract-syntax-tree
actions-on-google
actionscript-3
active-directory
activemq
activemq-artemis
acumatica
adobe-xd
aframe
ag-grid
agora.io
air
airflow
ajax
akka
alert
alexa
algorithm
alignment
allure
amadeus
amazon-cloudformation
amazon-cognito
amazon-deequ
amazon-dynamodb
amazon-ec2
amazon-ecs
amazon-emr
amazon-redshift
amazon-s3
amazon-sagemaker
amazon-sqs
amazon-web-services
amcharts
amcharts4
amp-html
anaconda
android
android-activity
android-asynctask
android-fragments
android-jetpack-compose
android-layout
android-management-api
android-ndk
android-recyclerview
android-studio
android-wallpaper
android-x86
android-youtube-api
angular
angular-cli
angular-cli-v6
angular-material
angular-material2
angular5
angular6
angular7
angular7-router
angularjs
animation
annotations
ansible
ant
antd
antlr
antlr4
anylogic
anypoint-studio
apache
apache-beam
apache-camel
apache-commons-dbcp
apache-curator
apache-drill
apache-flex
apache-flink
apache-kafka
apache-kafka-connect
apache-nifi
apache-spark
apache-superset
apache2
apex
apex-code
api
api-platform.com
appdelegate
apple-sign-in
applepay
applescript
architecture
arcore
arduino
arkit
arm
arrays
artifactory
artificial-intelligence
asp-classic
asp.net
asp.net-core
asp.net-core-mvc
asp.net-identity
asp.net-mvc
asp.net-mvc-3
asp.net-mvc-4
asp.net-web-api
aspectj
aspnetboilerplate
assembly
asynchronous