Linked Questions

1 vote
1 answer
239 views

I was watching a youtube tutorial in DS&A (using JS) and he mentioned that the time complexity of accessing or removing property in an object is constant? how is that possible shouldn't we search ...
abdallah nagy's user avatar
0 votes
1 answer
233 views

I have the following object: let obj = { "name": "someName", "age": 33, "city": "someCity" } I understand that an object is not indexed "...
larry ckey's user avatar
1 vote
1 answer
85 views

I need to map accented letters (é, ü, á, ï, ö, ..., etc.) to their corresponding letters in English (e, u, a, i, o, ..., etc.). I know I can do this in several approaches: Looping through an array - ...
Lorraine Ram-El's user avatar
126 votes
5 answers
286k views

Why do I keep seeing different runtime complexities for these functions on a hash table? On wiki, search and delete are O(n) (I thought the point of hash tables was to have constant lookup so what's ...
user1136342's user avatar
  • 4,971
46 votes
4 answers
16k views

Objects in JavaScript can be used as Hashtable (the key must be String) Is it perform well as Hashtable the data structure? I mean , does it implemented as Hashtable behind the scene? Update: (1) I ...
ciochPep's user avatar
  • 2,612
62 votes
3 answers
26k views

For some algorithm I was writing recently I thought that a hash would be excellent. I thought that I could probably just use the member variables in an object as key value pairs. I am not sure if this ...
Parris's user avatar
  • 18.5k
4 votes
7 answers
18k views

here is a sample example where there are two arrays and we have a merge() to which we pass the arrays. the merge() should return the merged array such that it should merge the objects which have same ...
shubham patil's user avatar
-2 votes
4 answers
514 views

I have an array of objects with a property I want to filter on called "Country". I have the user select which countries they want to see and wish to return an array of objects filtered by that ...
jon's user avatar
  • 427
0 votes
1 answer
211 views

I have a socket with realtime values. I get the unsorted row object then I need to create a list of the received objects and sort them by price. After this, my data is sorted correctly. I am using ...
Saeed Mansoori's user avatar
2 votes
2 answers
78 views

var key = 'a'; map[key] = 'value'; map['a'] = 'value'; In Java this is optimized automatically during compilation. I want to know if any JS compiler does such optimization on its own.
Ruturaj Patil's user avatar