Question Detail: Speaking in terms of automata and regular languages, how would it be possible for a string repeating some $w$ twice equal a string repeating that same $w$ thrice? That is, why is the language $qquad L = {w in Read More …
Category: Uncategorized
Relation and difference between associative array and hashing table?
Question Detail: I thought associative array (i.e. map, or dictionary) and hashing table were the same concept, until I saw in Wikipedia that For dictionaries with very small numbers of bindings, it may make sense to implement the dictionary using an Read More …
What is complement of Context-free languages?
Question Detail: I need to know what class of CFL is closed under i.e. what set is complement of CFL. I know CFL is not closed under complement, and I know that P is closed under complement. Since CFL $subsetneq$ P Read More …
Given the logical address, how to extract the page number?
Question Detail: I am studying Computer Systems. I have th following question and its answer: Given the logical address 0xAEF9 (in hexadecimal) with a page size of 256 bytes, what is the page number? Answer: 0xAE (I found this answer in Read More …
What algorithm would compute the maximum choices from two sets?
Question Detail: Given two vectors of integers of possibly unequal lengths, how can I determine the maximum result possible from accumulating choosing the maximum between corresponding pairs of numbers between the two vectors with extra zeros inserted into the shorter vector Read More …
Constructing a binary tree with given traversals
Question Detail: I have given a post order & in order traversal a BST & I need to construct it. I want to know how to do this. for eg. Post Order : DCBGFEA In Order : BDCAFGE This is how Read More …
Constructing a binary tree with given traversals
Question Detail: I have given a post order & in order traversal a BST & I need to construct it. I want to know how to do this. for eg. Post Order : DCBGFEA In Order : BDCAFGE This is how Read More …
What algorithm would compute the maximum choices from two sets?
Question Detail: Given two vectors of integers of possibly unequal lengths, how can I determine the maximum result possible from accumulating choosing the maximum between corresponding pairs of numbers between the two vectors with extra zeros inserted into the shorter vector Read More …
Given the logical address, how to extract the page number?
Question Detail: I am studying Computer Systems. I have th following question and its answer: Given the logical address 0xAEF9 (in hexadecimal) with a page size of 256 bytes, what is the page number? Answer: 0xAE (I found this answer in Read More …
Time complexity formula of nested loops
Question Detail: I’ve just begun this stage 2 Compsci paper on algorithms, and stuff like this is not my strong point. I’ve come across this in my lecture slides. int length = input.length(); for (int i = 0; i < length Read More …