Topic — Add New » Posts Last Poster Freshness
Maximum o's and 1's 1 Ankur 8 months

In an array with O's and 1's ..Find the length of maximum subset which contains equal no of 0 and 1s

For ex

10000100110110

Ans in Bold ->100[b]0011011010[/b]

Can anyone do it in O(n) and O(1) time and space complexity respectively

standard input in Perl 3 Venkat 1 year

What is the equivalent of scanf in Perl?

Perl uses 4 RexReno 1 year

When do we use Perl. I mean for what kind of projects perl is used?

Anonymous hashes in Perl 1 perl 1 year

What are anonymous hashes in Perl? How to create?

Perl and OOP 1 1 year

What r the OOP features supported by Perl?

use and require in Perl 3 1 year

What is the difference b/w use and require in Perl

Switch On and Off a given tree 1 1 year

You are given a rooted, ordered, but not necessarily binary, tree. Each node can be in one of two states: either "on" or "off."
Initially all nodes are off.
The rule is that you can switch a node on only if none of its descendants and none of its ancestors are already on.
The tree structure is fixed. Only the nodes' states may change.

The problem: devise an efficient data structure to support the following two operations. (You may need to do some preprocessing.)

Perl v/s Python 2 2 years

Can anyone please explain me the difference between perl and python and when to use what. I now hear that people are migrating towards python