Login Register
  • Greater Noida (Near Delhi), Uttar Pradesh
  • +91-8377803450
Ritambhara Technologies – Coding Interview Preparations
  • Books
  • Crack Coding Interview
  • Videos
  • About Us
    • Contact Us
  • Books
  • Crack Coding Interview
  • Videos
  • About Us
    • Contact Us
14
Nov
Sort in C++ standard template library

Two elements of complex data types are not directly comparable. Consider the student structure defined as below struct Student { int rollNo; char name[25]; char grade; }; Student arr[MAX_NUM_STUDENTS]; Objects of Student type are not directly comparable. To sort array arr, we need to specify how one student compares with another student. If there are […]

Posted in: Algorithms, C++,
Tags: Sorting,
05
Aug
HashMap performance improvement in Java 8

What improvement has java-8 made that performance of HashMap.get() function call is fast by 20% in Java-8.

Posted in: Java, Language,
Tags: hashing, Java,
13
May
Generic pointers in C language

Generic programming, loosely means that the code we have written is type-independent. It is a larger topic, macros in C language also comes under generic programming. In this post we are only discussing generic pointers.

Posted in: C,
Tags: Pointers,
08
May
Find minimum of 3 numbers without using comparator operator

How will you find minimum of three integers without using any comparison operator ?

Posted in: C, C++,
Tags: Bit twidling, Tricks,
25
Jul
Linked List Implementation of Stack in C++

Write a class which will implement the Stack data structure in C++. Give the declaration & definition of the class. Also define the Node. For simplicity, you may assume stack to hold integer data type.

Posted in: Algorithms, C++,
Tags: Linked List, Stack,
20
May
Printing something without modifying main

The below C++ code will print “Hello World”. #include <iostream> int main() { cout<<“Hello World”; } Without modifying main function, add code to print “Ritambhara” before “Hello World”. You cannot add/remove any statement to main function

Posted in: C++,
Tags: main,
19
May
Function to swap strings in C

Write a C language function that will swap two strings.

Posted in: C,
Tags: swap,
07
May
2
Find the output of C++ Program

What will be the output of the below C++ program: // Template Function – Not taking class template <class T, int i> int myFun(){ T x = 10; i = 20; } int main(){ fun<int, 4>(); return 0; }

Posted in: C++,
Tags: template,
06
Feb
3
Which of the two comparison is better

While comparing a variable with a constant (literal) in C/C++ language, which of the two ways of comparison should we use ? if( x == 2 ) … if( ptr == NULL ) … Or if( 2 == x ) … if( NULL == ptr ) … In the first comparison we are writing variable […]

Posted in: C, C++, Java,
Tags: Coding Practice,
05
Feb
Disallowing object creation on heap

Object of a class can be created dynamically on heap or statically on Stack or Data Area. If we have a class MyClass, then the below objects will be created on heap. // Operator: New MyClass *ptr1 = new MyClass(); // Crating object of MyClass on heap. // Operator: New-Array MyClass *ptr2 = new MyClass[10]; // […]

Posted in: C++,
Tags: memory, new,
  • 1
  • 2
  • 3
  • …
  • 7
  • Next

Find Us on Facebook

Log In


Lost your password?
Register
Forgotten Password
Cancel

Register For This Site

A password will be e-mailed to you.

Tag Cloud

algorithm Array Array; Sorting Asymptotic Complexity Binary Search Tree Binary Tree Binary Tree; Algorithm Bit twidling C++11 Design Pattern Divide-n-Conquer Dynamic Programming function hashing Helper Function Interview Puzzle IP Address Linked List Logic main Matrix memory Merge new Number Series Operator Output Palindrome Permutation pointer Polish Notation Puzzle Quant Queue Recursion Searching sizeof Sorting Stack String struct swap template Traversal Trie
Footer logo
Copyright © 2012 Ritambhara Technologies
  • Articles
  • Language
  • Algorithms
  • Networking
  • Operating Systems
  • Design
  • DBMS
  • Logic
  • Videos
Search