Algorithms

3K

Solutions

10

Articles & Videos

4K

Contributors

An algorithm is a self-contained step-by-step set of operations to be performed. Algorithms exist that perform calculation, data processing, and automated reasoning. Starting from an initial state and initial input (perhaps empty), the instructions describe a computation that, when executed, proceeds through a finite number of well-defined successive states, eventually producing "output" and terminating at a final ending state. The transition from one state to the next is not necessarily deterministic; some algorithms, known as randomized algorithms, incorporate random input.

Share tech news, updates, or what's on your mind.

Sign up to Post

If I am comparing my algorithm to another algorithm. My algorithm has a complexity f O(n) whereas the other algorithm is O(n2).

I then measured the running time by implementing the algorithms.

Should the running time of the other algorithm be the square of the running time of my algorithm?

For example of my algorithm running time is 3 ms should the other algorithm running time be 9?
0
Free Tool: SSL Checker
LVL 8
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

I got a requirement from my client that he wishes to encrypt/ password protect some of the documents, before sending over to another user in another regional office.

By not writing the password into the email body.

How can the user in another regional office knows the password to decrypt/ open the protected documents?

What approach should be adopted? Is there any standard/ algorithm I can refer to? But we prefer not to use any 3rd party software/ utility.

Thank you.
0
the array has series of numbers Need to find all pairs in the array using a hash table
integers ...
0
How to disable disable any 96-bit hmac algorithms in centos
0
Merge sort, bitonic sort, radix sort, quick sort for opencl interface
0
A "valid" string is a string S such that for all distinct characters in S each such character occurs the same number of times in S. For example, aabb is a valid string because the frequency of both characters a and b is 2, whereas aabbc is not a valid string because the frequency of characters a, b, and c is not the same. Watson gives a string S to Sherlock and asks him to remove some characters from the string such that the new string is a "valid" string. Sherlock wants to know from you if it's possible to be done with less than or equal to one removal..

I tried to solve this specific challenge in Hackerank and I can't pass all the test cases. 2 is the minimum number of removals required to make it a valid string. It can be done in following two ways:

input = aabbcd...

Sample Output must be NO.

Explanation

Remove c and d to get aabb. Or remove a and b to get abcd.


-----------------------------------------------------here is my code----------------------------------------------------
function processData(input) {
    //Enter your code here

var i =0;
  var m = string.match(/string[i]/);
       

if (m && m.length > 2) {
  console.log("yes");
} else {console.log ("NO");}

    console.log(m);
----------------------------------------------------------------------------------------
The thing is that match() returns null.....
Please if you find time answer my question!
Thank you so much
0
Hi
I am working on GIS applications and found the slope algorith in the net :

ftp://ftp.ecn.purdue.edu/jshan/86/help/html/gmd/slope_percent.htm

attached is an example I used to apply the above algorithm for calculating slopes from a DEM. I am not good in math so I got two results.
Can you help me please . I got 73, -33, 56.648 and I do not how to do the arctan.
slope.doc
slope.doc
0

Algorithms

3K

Solutions

10

Articles & Videos

4K

Contributors

An algorithm is a self-contained step-by-step set of operations to be performed. Algorithms exist that perform calculation, data processing, and automated reasoning. Starting from an initial state and initial input (perhaps empty), the instructions describe a computation that, when executed, proceeds through a finite number of well-defined successive states, eventually producing "output" and terminating at a final ending state. The transition from one state to the next is not necessarily deterministic; some algorithms, known as randomized algorithms, incorporate random input.